Update an administrator
/administrators/{administrator_id}Updates an administrator's name or email address, or restores an administrator from the trash.
To restore a trashed administrator, set deleted to false. Restoring requires the administrators.delete permission and is rejected with validation_failed if another active administrator already uses the same email address.
Roles and permissions can only be changed through the update administrator permissions operation. Fields such as role, status, and password are rejected with unknown_field.
Send the ETag returned by the retrieve operation in the If-Match header to avoid overwriting a newer version.
Autonomous mode: the API credential secret, sent as a bearer token. Credential secrets are identified by a fixed prefix.
In: header
Path Parameters
Header Parameters
Client-generated key that makes the request safe to retry. Must be 1 to 128 characters from [A-Za-z0-9._:-]. Optional on this operation; when sent, a malformed key returns idempotency_key_invalid, and repeating the request with the same key and the same body returns the stored result with Idempotent-Replayed: true.
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.
length <= 64Request 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
curl -X PATCH "https://example.com/administrators/string" \ -H "Content-Type: application/json" \ -d '{}'{ "data": { "created_at": "2019-08-24T14:15:22Z", "deleted": true, "email": "user@example.com", "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" }}Retrieve an administrator GET
Retrieves an administrator by its public ID. The response includes an `ETag` representing the current revision. Send this value in the `If-Match` header when updating the administrator or its permissions to avoid overwriting a newer version. Administrators in the trash are not returned by this operation.
Delete an administrator DELETE
Moves the administrator to the trash. A trashed administrator can be restored with the update operation by setting `deleted` to `false`. The last `root` administrator in the account cannot be deleted, and in human mode administrators cannot delete themselves. Administrators with the `root` or `master_admin` role cannot be deleted through the API; attempts return `delegation_limit_exceeded`. API credentials created by the deleted administrator are not revoked.