# Add Member

> Add a member to an organization, named by email or by user ID.

Canonical URL: https://docs.botyard.io/docs/api/members/add_member_v1_orgs__org_id__members_post

`POST /v1/orgs/{org_id}/members`

Add a member to an organization, named by email or by user ID.

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `org_id` | path | yes | string |  |

## Request body

`application/json`: MemberAddByEmail \| MemberAddByUserId (required)

One of — `MemberAddByEmail`:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `role_id` | OrgRole | no | Role to assign |
| `email` | string | yes | Email of the user to add |

One of — `MemberAddByUserId`:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `role_id` | OrgRole | no | Role to assign |
| `user_id` | string | yes | ID of the user to add |

## Responses

| Status | Description | Body |
| --- | --- | --- |
| `201` | Successful Response | MemberResponse |
| `default` | RFC 9457 Problem Details error response | ProblemDetails |

Full schemas: operation `add_member_v1_orgs__org_id__members_post` in the OpenAPI spec at https://api.botyard.io/openapi.json.
