POST
/api/organizations/{organization_id}/invitationsAuthenticatedInvite a user to an organization
Creates a pending invitation for an existing user (looked up by e-mail address or user id) and e-mails them. Organization owners and platform administrators only. Refused when the user is already a member or already has a pending invitation.
operationId
post_api_organizations_organization_id_invitationsOrganizationsAuthentication & permissionsAuthenticated
Any authenticated user
- 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
- Any authenticated user
- Notes
- Only organization owners or platform administrators may invite members.
Path parameters
| Name | Type | Description |
|---|---|---|
| organization_id* | string | Organization id (URL-safe slug) |
Request body
Required
application/json
CreateOrganizationInvitationRequest
| Property | Type | Description |
|---|---|---|
| input_mode* | "email" | "uid" | How |
| identifier* | string | The invitee's e-mail address ( minLength: 1 |
JSONExample
"input_mode""email"
"identifier""teammate@example.com"
Responses
application/json
| Property | Type | Description |
|---|---|---|
| success* | true | |
| message* | string | |
| data* | object | |
| invitation* | OrganizationInvitation | An invitation for a user to join an organization. |
| invitation_id* | string (uuid) | |
| organization_id* | string | minLength: 4maxLength: 32pattern: ^[a-z][a-z0-9_-]+$ |
| organization_name | string | |
| inviter_uid* | string (uuid) | |
| inviter_email | string (email) | |
| invitee_uid* | string (uuid) | |
| invitee_email | string (email) | |
| status* | "pending" | "accepted" | "declined" | "revoked" | "expired" | |
| created_at* | number | exclusiveMinimum: 0 |
| expires_at* | number | exclusiveMinimum: 0 |
| responded_at | number | null | null | exclusiveMinimum: 0 |
JSONExample
"success"true
"message""string"
"data"
"invitation"
"invitation_id""123e4567-e89b-12d3-a456-426614174000"
"organization_id""string"
"organization_name""string"
"inviter_uid""123e4567-e89b-12d3-a456-426614174000"
"inviter_email""user@example.com"
"invitee_uid""123e4567-e89b-12d3-a456-426614174000"
"invitee_email""user@example.com"
"status""pending"
"created_at"1.5
"expires_at"1.5
"responded_at"1.5
Example request
bashcurl
curl -X POST 'https://auth.schemavaults.com/api/organizations/<organization_id>/invitations' \
-b 'refresh_token_<auth_server_app_id>=<value>' \
-H 'Content-Type: application/json' \
-d '{
"input_mode": "email",
"identifier": "teammate@example.com"
}'