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": "[email protected]", "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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ” X-Tenant-Id
string
Tenant selector for multi-tenant admin requests.
Request Body required
Section titled “Request Body required ” Media type application/json
object
email
required
string format: email
name
string | null
role_id
required
string
scope_type
string
scope_id
string
role_expires_at
integer format: int64
expires_in_hours
number
ip_restriction_enabled
boolean
allowed_ip_ranges
Single IPv4/IPv6 addresses, CIDR ranges, or explicit start-end ranges.
Array<string>
Responses
Section titled “ Responses ”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", "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
error_description
string
invitation_id
required
string
Example
{ "error": "email_delivery_failed"}