Skip to content

Users

  • Account Scope Required, please include X-Auth-Account header with your Account ID.
  • These endpoints are not available via OAuth.
  • Every endpoint on this page requires an admin role on the account — including GET /api/users and GET /api/users/:id, which return 401 for a non-admin caller.
  • Creating a user additionally requires the account to be a reseller.

List Users

List all users associated with your account.

GET /api/users

Returned Params
  • users: Array
    • id: String
    • fname: String
    • lname: String
    • email: String
    • account_brand_id: Integer
    • locale: String
    • created_at: DateTime
    • updated_at: DateTime

View User

View a user.

GET /api/users/:id

Returned Params
  • user: Object
    • id: String
    • fname: String
    • lname: String
    • email: String
    • account_brand_id: Integer
    • locale: String
    • created_at: DateTime
    • updated_at: DateTime

Create a User

POST /api/users

This will create a user (and a new sub-account) under the current account. Requires a reseller account. The new user and their account take the reseller's brand, the same as an account created through POST /api/accounts with X-Auth-Account.

Params
  • user: Object
    • fname: String (required)
    • lname: String (required)
    • email: String (required)
    • company_name: String | This will be the account name.
    • locale: String | en or nl. Omit the key entirely rather than sending an empty string — "" is rejected with 422
    • billing_term: String | monthly or annual
Returned Params
  • user: Object
    • id: String
    • fname: String
    • lname: String
    • email: String
    • created_at: DateTime
    • updated_at: DateTime
    • password: String | Returned only on creation.
    • account_id: String
    • api_token: String | Returned only on creation.

password and api_token are returned only in this create response — store them immediately. Use the returned API credentials to authenticate as that user going forward.


Update / Delete a User

PATCH /api/users/:id and DELETE /api/users/:id are not available (401). The request is still validated first, so other statuses can come back before the 401.

Errors
  • 401 | the caller has no admin role on the account — and, once every check passes, the action itself
  • 404 | no user with that id on this account
  • 422 | the account is not a reseller. Body: {"errors":["Must have reseller permissions"]}