---
title: "Add a registered user to the workspace by email"
method: POST
path: "/api/v1/workspaces/{workspaceId}/members"
tags: ["Workspaces"]
---

# Add a registered user to the workspace by email

`POST /api/v1/workspaces/{workspaceId}/members`

## Request

- Base URL: `https://otprun.com`
- URL: `https://otprun.com/api/v1/workspaces/{workspaceId}/members`
- Auth: HTTP bearer

## Path parameters

- `workspaceId` integer, required

## Request body

- InviteInputBody
  - `email` string, email, required
  - `role` 'owner' | 'admin' | 'developer' | 'viewer', required

## Response `201`

Created

- MemberBody
  - `created_at` string, date-time, required
  - `email` string, required: Empty for members who sign in with a phone number
  - `name` string, required
  - `phone` string, nullable, required: Masked phone number of members who sign in with a phone number
  - `public_id` string, uuid, required
  - `role` 'owner' | 'admin' | 'developer' | 'viewer', required
  - `user_id` integer, required

## Other responses

- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/otprun/apis/otp-run-api.md) · [All operations](https://skmtc.dev/otprun/apis/otp-run-api/llms.txt) · [OpenAPI document](https://skmtc.dev/otprun/apis/otp-run-api/revisions/43d40d5f4050?raw)
