PATCH
/api/organizations/{organization_id}/invitations/{invitation_id}AuthenticatedAccept or decline an invitation
Lets the invited user accept (joining the organization as a member) or decline a pending invitation. Only the invitee may respond; accepting is refused once the caller reached the membership limit.
operationId
patch_api_organizations_organization_id_invitations_invitation_idOrganizationsAuthentication & 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 the invited user may respond to an invitation.
Path parameters
| Name | Type | Description |
|---|---|---|
| organization_id* | string | Organization id (URL-safe slug) |
| invitation_id* | string (uuid) | Id of the invitation |
Request body
Required
application/json
RespondToOrganizationInvitationRequest
| Property | Type | Description |
|---|---|---|
| action* | "accept" | "decline" |
JSONExample
"action""accept"
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 PATCH 'https://auth.schemavaults.com/api/organizations/<organization_id>/invitations/<invitation_id>' \
-b 'refresh_token_<auth_server_app_id>=<value>' \
-H 'Content-Type: application/json' \
-d '{
"action": "accept"
}'