Create tenant invitation
POST
/api/admin/tenants/{id}/invitations
Code sample: Shell / cURL
curl --request POST \ --url https://auth.example.com/api/admin/tenants/example/invitations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "invited_email": "[email protected]", "role_id": "role_tenant_admin", "org_id": "org_123", "max_uses": 1, "expires_in_hours": 72 }'Creates an invitation token for tenant-specific signup routing and optionally sends an email through the configured email notifier.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string
Request Body required
Section titled “Request Body required ”Invitation target and optional assignment scope.
Media type application/json
object
invited_email
string | null format: email
role_id
string | null
org_id
string | null
max_uses
integer
expires_in_hours
integer
key
additional properties
Example
{ "role_id": "role_tenant_admin", "org_id": "org_123", "max_uses": 1, "expires_in_hours": 72}Responses
Section titled “ Responses ”Created tenant invitation. The token is returned only in this create response.
Media type application/json
object
id
string
invite_url
string format: uri
token
string
expires_at
integer format: int64
email_sent
boolean
key
additional properties
Example
{ "id": "inv_123", "invite_url": "https://tenant-123.auth.example.com/discover?invite_token=abcdef123456", "token": "abcdef123456", "expires_at": 1770259200, "email_sent": true}Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}