Users

Create an API user

Create a new API user (a non-human account intended to authenticate integrations) within the caller's organisation. The new user is attached to the supplied site_id, given the organisation's default API role, has their email pre-verified, and is issued a personal access token in the response — store it securely because Trybe will never return it again.

Requires the caller's site-user to hold the users:manage permission on the target site. The name must be unique across API users in the organisation.

post/api-users

Request body

namestring required

Human-readable label for the API user. Shown in the API users list and recorded against audit-log entries so operators can identify which integration made a change. Pick something descriptive like "Mailchimp sync" or "POS terminal 3". Must be unique across API users in the organisation.

site_idstring uuid required

Identifier of the site to attach the new API user to. The caller must hold the users:manage permission on this site; the user inherits the organisation that owns the site. Additional sites can be granted later by an organisation admin.

Example request

{
  "name": "Mailchimp sync"
}

Response

A newly created API user, including the access token. The token field is only returned on the create response — it is not persisted by Trybe in a retrievable form, so store it securely as soon as you receive it.

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",
    "token": "eyABCDEFGHIJKLMNOPQRSTUVWXYZ12345678910ABCDEFGHIJKLMNOPQRSTUVWXYZx.eyABCDEFGHIJKLMNOPQRSTUVWXYZ12345678910ABCDEFGHIJKLMNOPQRSTUVWXYZx.ABCDEFGHIJKLMNOPQRSTUVWXYZ12345678910ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.