Skip to content

Users

Users are the people in your account. Each user has one or more roles and can belong to teams. Keys with the Read Only role can call the GET endpoints. Keys with the Admin role can call all of them.

The list endpoint is paginated, see Pagination. The user list uses a two-part cursor, described below.

Role Description
account-owner Owns the account.
account-admin Administers the account.
team-admin Administers teams.
standard-user Standard access.

GET /account/{accountId}/user

Required role
Admin or Read Only

Path parameters

Name Type Required Description
accountId number Yes Your account ID.

Query parameters

Name Type Required Description
limit number No Page size. There is no default: if you omit it, the response contains as many users as fit in one page. When given, use a whole number from 1 to 100; any other value is treated as 20.
username string No Pagination cursor, part one. Pass pk.username from the previous response.
email string No Pagination cursor, part two. Pass pk.email from the previous response.

Response

Status 200.

Name Type Description
items array User summaries, described below.
pk object Present only when more results exist. Contains username and email.

Each item in items:

Name Type Description
accountId number The account ID.
createdAt number When the user was created.
email string The user’s email address.
name string The user’s display name.
providerName string The sign-in provider name.
providerType string The sign-in provider type.
roles array of strings The user’s roles.
username string The user’s username.

Errors

No errors are specific to this endpoint. See Errors for the common ones.

Notes

  • To get the next page, send both username and email from pk. Sending only one of them is not enough.
  • A page can contain fewer users than limit while pk is still present. Keep requesting pages until pk is absent.

GET /account/{accountId}/user/{username}

Required role
Admin or Read Only

Path parameters

Name Type Required Description
accountId number Yes Your account ID.
username string Yes The user’s username, URL-encoded.

Response

Status 200.

Name Type Description
accountId number The account ID.
createdAt number When the user was created.
email string The user’s email address.
name string The user’s display name.
providerName string The sign-in provider name.
providerType string The sign-in provider type.
roles array of strings The user’s roles.
teamIds array of numbers IDs of the teams the user belongs to.
username string The user’s username.
notifications array The user’s notification rules. See below.
testCount number Number of test notifications the user has sent.
testAt number When the user last sent a test notification.
verifiedPhone array of strings Phone numbers verified for voice calls.
verifiedSms array of strings Phone numbers verified for text messages.

notifications items:

Name Type Description
time number Minutes after an alert before this notification is sent. 0 to 60.
type string email, phone, or sms.
value string The address or phone number.

DELETE /account/{accountId}/user/{username}

Required role
Admin

Path parameters

Name Type Required Description
accountId number Yes Your account ID.
username string Yes The user’s username, URL-encoded.

Response

Status 200 with an empty object.

Errors

Status When
403 The user is the account owner.
404 The user does not exist.
409 The user still belongs to one or more teams. The error message lists them.

Notes

  • The account owner cannot be deleted.
  • Remove the user from all teams first, using Remove Team Member.
  • A user-delete entry is written to the audit log with your API key as the actor.