Accept an invitation
POST
/tenants/invitations/{token}/accept
const url = 'https://localhost:3000/api/v1/tenants/invitations/example/accept';const options = {method: 'POST', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://localhost:3000/api/v1/tenants/invitations/example/accept \ --header 'Authorization: <Authorization>'Accepts an invitation and joins the tenant
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”token
required
string
Invitation token
Responses
Section titled “Responses”Membership created
Media typeapplication/json
object
account_id
required
string format: uuid
display_name
DisplayName is the optional account display name; absent when unset.
string
id
required
string format: uuid
invited_by
string format: uuid
joined_at
required
string format: date-time
role
required
string
tenant_id
required
string format: uuid
Example
{ "account_id": "550e8400-e29b-41d4-a716-446655440000", "display_name": "Alice", "id": "550e8400-e29b-41d4-a716-446655440000", "invited_by": "550e8400-e29b-41d4-a716-446655440000", "joined_at": "2024-01-15T10:30:00Z", "role": "member", "tenant_id": "550e8400-e29b-41d4-a716-446655440000"}Invalid token
Media typeapplication/json
object
error
required
string
message
string
Example
{ "error": "invalid_request", "message": "Invalid request body"}Unauthorized
Media typeapplication/json
object
error
required
string
message
string
Example
{ "error": "invalid_request", "message": "Invalid request body"}Invitation not found or expired
Media typeapplication/json
object
error
required
string
message
string
Example
{ "error": "invalid_request", "message": "Invalid request body"}Already a member
Media typeapplication/json
object
error
required
string
message
string
Example
{ "error": "invalid_request", "message": "Invalid request body"}Invitation already used
Media typeapplication/json
object
error
required
string
message
string
Example
{ "error": "invalid_request", "message": "Invalid request body"}Internal error
Media typeapplication/json
object
error
required
string
message
string
Example
{ "error": "invalid_request", "message": "Invalid request body"}