Create an end user.
curl --request POST \ --url https://auth.example.com/api/admin/users \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: example' \ --data '{ "email": "hello@example.com", "name": "example", "given_name": "example", "family_name": "example", "nickname": "example", "preferred_username": "example", "picture": "https://example.com", "email_verified": true, "phone_number": "example", "phone_number_verified": true, "user_type": "example" }'Allocate an account route and create a user in the selected tenant. Returns 201 only after Lookup directory publication is active. A transient publication delay returns 202 with a durable operation identifier that can be resumed by retrying the same request and Idempotency-Key. While elastic D1 capacity is being provisioned, or when the private Control binding is temporarily unavailable during rollout, or while a newly deployed runtime database binding is propagating, the endpoint returns 503 with Retry-After; clients must retry the same request and Idempotency-Key after that delay.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ”Tenant selector for multi-tenant admin requests.
Stable replay-protection key for one account creation request.
Request Body required
Section titled “Request Body required ”object
Example generated
{ "email": "hello@example.com", "name": "example", "given_name": "example", "family_name": "example", "nickname": "example", "preferred_username": "example", "picture": "https://example.com", "email_verified": true, "phone_number": "example", "phone_number_verified": true, "user_type": "example"}Responses
Section titled “ Responses ”Admin end-user response.
object
object
Unix timestamp in milliseconds.
Unix timestamp in milliseconds.
Example
{ "user": { "id": "user_123", "tenant_id": "default", "email": "user@example.com", "name": "Example User", "given_name": "Example", "family_name": "User", "nickname": null, "preferred_username": "example", "picture": "https://auth.example.com/api/avatars/user_123.png", "phone_number": null, "website": null, "gender": null, "birthdate": null, "locale": "en-US", "zoneinfo": "UTC", "address_formatted": null, "address_street_address": null, "address_locality": null, "address_region": null, "address_postal_code": null, "address_country": null, "declared_residence": null, "pii_class": "PROFILE", "email_verified": true, "phone_number_verified": false, "user_type": "end_user", "is_active": true, "pii_partition": "default", "pii_status": "active", "created_at": 1770000000000, "updated_at": 1770003600000, "last_login_at": null, "status": "active", "suspended_at": null, "suspended_until": null, "locked_at": null, "locked_until": null, "lifecycle_state": "active" }}Account data is durable but Lookup directory publication is still pending.
object
Example
{ "status": "pending", "state": "preparing"}Error response.
object
Example generated
{ "error": "example", "message": "example", "error_description": "example"}Error response.
object
Example generated
{ "error": "example", "message": "example", "error_description": "example"}Account capacity is being provisioned or the private Control binding is temporarily unavailable during rollout, or a newly deployed runtime database binding is still propagating. Retry the same idempotent request.
object
Example generated
{ "error": "example", "message": "example", "error_description": "example"}Headers
Section titled “Headers ”Example
10Minimum suggested delay before retrying, in seconds.