PATCH/api/organizations/{organization_id}/invitations/{invitation_id}Authenticated

Accept 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_idOrganizations

Authentication & permissionsAuthenticated

Any authenticated user

Accepted credentials
Who may call
Any authenticated user
Notes
Only the invited user may respond to an invitation.

Path parameters

NameTypeDescription
organization_id*string

Organization id (URL-safe slug)

invitation_id*string (uuid)

Id of the invitation

Request body

Required

application/json
RespondToOrganizationInvitationRequest
PropertyTypeDescription
action*"accept" | "decline"
JSONExample
"action""accept"

Responses

application/json
PropertyTypeDescription
success*true
message*string
data*object
invitationOrganizationInvitation

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_namestring
inviter_uid*string (uuid)
inviter_emailstring (email)
invitee_uid*string (uuid)
invitee_emailstring (email)
status*"pending" | "accepted" | "declined" | "revoked" | "expired"
created_at*number

exclusiveMinimum: 0

expires_at*number

exclusiveMinimum: 0

responded_atnumber | 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"
}'

Other methods on this path