Skip to content

Invite an Admin to enroll a Passkey.

POST
/api/admin/admin-invitations
Code sample: Shell / cURL
curl --request POST \
--url https://auth.example.com/api/admin/admin-invitations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "email": "hello@example.com", "name": "example", "role_id": "example", "scope_type": "global", "scope_id": "example", "role_expires_at": 1, "expires_in_hours": 24, "ip_restriction_enabled": false, "allowed_ip_ranges": [ "example" ] }'

Creates a pending invitation and emails a one-time enrollment code. The code is not returned by this API and cannot create an Admin session. IP restrictions are disabled by default.

X-Tenant-Id
string

Tenant selector for multi-tenant admin requests.

Media type application/json
object
email
required
string format: email
name
string | null
role_id
required
string
scope_type
string
Allowed values: global tenant
scope_id
string
role_expires_at
integer format: int64
expires_in_hours
number
default: 24 > 0 <= 168
ip_restriction_enabled
boolean
allowed_ip_ranges

Single IPv4/IPv6 addresses, CIDR ranges, or explicit start-end ranges.

Array<string>
<= 5 items

Invitation created and email sent.

Media type application/json
object
id
required
string
email
required
string format: email
expires_at
required
integer format: int64
email_sent
required
boolean
Example generated
{
"id": "example",
"email": "hello@example.com",
"expires_at": 1,
"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"
}

The invitation was persisted, but email delivery failed. The returned invitation ID can be used to reload the pending invitation and retry delivery.

Media type application/json
object
error
required
string
Allowed value: email_delivery_failed
error_description
string
invitation_id
required
string
Example
{
"error": "email_delivery_failed"
}