List invitations
GET
/tenants/{id}/invitations
const url = 'https://localhost:3000/api/v1/tenants/example/invitations';const options = {method: 'GET', 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 GET \ --url https://localhost:3000/api/v1/tenants/example/invitations \ --header 'Authorization: <Authorization>'Returns all invitations for a tenant. Requires admin or owner role.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Tenant ID (UUID)
Responses
Section titled “Responses”List of invitations
Media typeapplication/json
Array<object>
object
created_at
required
string format: date-time
created_by
required
string format: uuid
expires_at
required
string format: date-time
id
required
string format: uuid
role
required
string
tenant_id
required
string format: uuid
token
string
token_preview
string
used_at
string format: date-time
used_by
string format: uuid
Example
[ { "created_at": "2024-01-15T10:30:00Z", "created_by": "550e8400-e29b-41d4-a716-446655440000", "expires_at": "2024-01-22T10:30:00Z", "id": "550e8400-e29b-41d4-a716-446655440000", "role": "member", "tenant_id": "550e8400-e29b-41d4-a716-446655440000", "token": "abc123...", "token_preview": "abc123...", "used_at": "2024-01-16T10:30:00Z", "used_by": "550e8400-e29b-41d4-a716-446655440000" }]Invalid ID
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"}Insufficient permissions
Media typeapplication/json
object
error
required
string
message
string
Example
{ "error": "invalid_request", "message": "Invalid request body"}Tenant not found
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"}