/api/organizations/{organization_id}/membersAdminAdd a member directly (administrators)
Makes an existing user (looked up by e-mail address or user id, the caller included) a member of the organization immediately, without an invitation to accept. Platform administrators only: organization owners invite members with POST /api/organizations/{organization_id}/invitations. Any pending invitation of the user to the organization is revoked. Refused for system organizations, service accounts (an organization-owned app's service account joins its organization through PUT /api/apps/{app_id}/service-account/organization-membership instead), users that already are members, users at the membership limit, and users without a verified MFA factor while the organization requires multi-factor authentication (error: mfa_required).
post_api_organizations_organization_id_membersOrganizationsAuthentication & permissionsAdmin
Platform administrators only
- Accepted credentials
- Auth server session (refresh token cookie)
cookie "refresh_token_<auth_server_app_id>" - Access token (cookie)
cookie "access_token_<auth_server_app_id>" - Access token (Bearer)
Authorization: Bearer <JWT>
- Auth server session (refresh token cookie)
- Who may call
- Platform administrators only
- Notes
- Only platform administrators may add members directly; organization owners must invite.
Path parameters
| Name | Type | Description |
|---|---|---|
| organization_id* | string | Organization id (URL-safe slug) |
Request body
Required
| Property | Type | Description |
|---|---|---|
| input_mode* | "email" | "uid" | How |
| identifier* | string | The user's e-mail address ( minLength: 1 |
| role | "member" | "owner" | Role of the new membership (default default: "member" |
Responses
| Property | Type | Description |
|---|---|---|
| success* | true | |
| message* | string | |
| data* | object | |
| member* | OrganizationMember | |
| membership_declaration_id* | string | Id of the membership row |
| organization_id* | string | minLength: 4maxLength: 32pattern: ^[a-z][a-z0-9_-]+$ |
| uid* | string (uuid) | The member's user id |
| role* | string | Membership role in the organization: |
| membership_created_at* | number | Unix epoch milliseconds the membership was created |
| email* | string (email) | |
| email_verified | boolean | |
| admin | boolean | Whether the member is a platform administrator |
| disabled | boolean | Whether the member's account is disabled |
| revoked_invitation_ids* | string (uuid)[] | Pending invitations of the user to the organization that the membership superseded |
Example request
curl -X POST 'https://auth.schemavaults.com/api/organizations/<organization_id>/members' \
-b 'refresh_token_<auth_server_app_id>=<value>' \
-H 'Content-Type: application/json' \
-d '{
"input_mode": "email",
"identifier": "teammate@example.com",
"role": "member"
}'