Developers

Create an administrator

POST/administrators

Creates an administrator in the current account.

By default, the new administrator receives an access email. Set send_credentials to false to skip it.

By default, the administrator receives the default permissions of the selected role across the whole account. Send product_ids to limit those default permissions to the listed products, or send policies (in the same format as PUT /administrators/{administrator_id}/permissions) to grant exactly the permissions listed there instead. Sending policies and product_ids together returns validation_failed. Both require the administrators.manage_permissions permission. If any part of the request is rejected, no administrator is created.

The API cannot create administrators with the root or master_admin role, and creating an administrator with the admin role requires the administrators.manage_permissions permission. Policies granted in policies cannot exceed what the caller can grant: an administrator (OAuth access token) grants what their own permissions grant, a credential only the delegable permissions of its own policies. Requests that exceed these limits return delegation_limit_exceeded.

AuthorizationBearer <token>

Credential: the API credential secret, sent as a bearer token. Credential secrets are identified by a fixed prefix.

In: header

Header Parameters

Idempotency-Key*string

Client-generated key that makes the request safe to retry. Must be 1 to 128 characters from [A-Za-z0-9._:-]. Required by this operation: a missing key returns idempotency_key_required, and a malformed key returns idempotency_key_invalid. Repeating the request with the same key and the same body returns the stored result with Idempotent-Replayed: true.

X-Client-Request-Id?string

Optional client-generated identifier of the request, up to 64 characters from [A-Za-z0-9._-]. Echoed back in the response and recorded in the request log; it never replaces the server-generated X-Request-Id.

Lengthlength <= 64

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/administrators" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "email": "[email protected]",    "name": "string",    "role": "string"  }'
{  "data": {    "created_at": "2019-08-24T14:15:22Z",    "deleted": true,    "email": "[email protected]",    "id": "string",    "last_login_at": "2019-08-24T14:15:22Z",    "name": "string",    "object": "administrator",    "product_ids": [      "string"    ],    "revision": "string",    "role": "root",    "status": "active",    "two_factor_enabled": true,    "updated_at": "2019-08-24T14:15:22Z"  }}