Skip to content

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.

id
required
string

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
default: 1 >= -1 <= 1000
expires_in_hours
integer
default: 72 >= 1 <= 720
key
additional properties
Example
{
"invited_email": "[email protected]",
"role_id": "role_tenant_admin",
"org_id": "org_123",
"max_uses": 1,
"expires_in_hours": 72
}

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