Users

Update an API user

Rename an existing API user. The user's site memberships, roles and access token are left unchanged — only the human-readable label is updated. The new name must remain unique across API users in the organisation.

Requires the caller's site-user to hold the users:manage permission on a site that the API user belongs to.

put/api-users/{userId}

Request body

namestring required

New human-readable label for the API user. Must be unique across API users in the organisation.

site_idstring uuid required

Identifier of the API user's primary site. Used to validate uniqueness of name within the owning organisation; the user's existing site memberships are not changed by this field.

Example request

{
  "name": "Mailchimp sync (production)"
}

Response

An API User

Example response

{
  "data": {
    "name": "Internal",
    "organisation_name": "Trybe Spa",
    "status": "active",
    "created_at": "2020-01-01T00:00:00.000Z",
    "updated_at": "2020-01-01T00:00:00.000Z"
  }
}

Changes