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.

RoleDescription
account-ownerOwns the account.
account-adminAdministers the account.
team-adminAdministers teams.
standard-userStandard access.

GET /account/{accountId}/user

Required role
Admin or Read Only

Path parameters

NameTypeRequiredDescription
accountIdnumberYesYour account ID.

Query parameters

NameTypeRequiredDescription
limitnumberNoPage 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.
usernamestringNoPagination cursor, part one. Pass pk.username from the previous response.
emailstringNoPagination cursor, part two. Pass pk.email from the previous response.

Response

Status 200.

NameTypeDescription
itemsarrayUser summaries, described below.
pkobjectPresent only when more results exist. Contains username and email.

Each item in items:

NameTypeDescription
accountIdnumberThe account ID.
createdAtnumberWhen the user was created.
emailstringThe user’s email address.
namestringThe user’s display name.
providerNamestringThe sign-in provider name.
providerTypestringThe sign-in provider type.
rolesarray of stringsThe user’s roles.
usernamestringThe 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

NameTypeRequiredDescription
accountIdnumberYesYour account ID.
usernamestringYesThe user’s username, URL-encoded.

Response

Status 200.

NameTypeDescription
accountIdnumberThe account ID.
createdAtnumberWhen the user was created.
emailstringThe user’s email address.
namestringThe user’s display name.
providerNamestringThe sign-in provider name.
providerTypestringThe sign-in provider type.
rolesarray of stringsThe user’s roles.
teamIdsarray of numbersIDs of the teams the user belongs to.
usernamestringThe user’s username.
notificationsarrayThe user’s notification rules. See below.
testCountnumberNumber of test notifications the user has sent.
testAtnumberWhen the user last sent a test notification.
verifiedPhonearray of stringsPhone numbers verified for voice calls.
verifiedSmsarray of stringsPhone numbers verified for text messages.

notifications items:

NameTypeDescription
timenumberMinutes after an alert before this notification is sent. 0 to 60.
typestringemail, phone, or sms.
valuestringThe address or phone number.

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

Required role
Admin

Path parameters

NameTypeRequiredDescription
accountIdnumberYesYour account ID.
usernamestringYesThe user’s username, URL-encoded.

Response

Status 200 with an empty object.

Errors

StatusWhen
403The user is the account owner.
404The user does not exist.
409The 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.