The Users API provides a simple interface to your account's users. The API provides read-only access, where you can retrieve a single user as well as list of all users associated with your account.

When you sign up with Sell, we create a single master account and a single user with account management privileges. By logging in as the account manager, you can create as many additional users as you need.

JSON format

NameRead OnlyTypeDescription
idtruenumberUnique identifier of the user.
namefalsestringFull name of the user.
emailfalsestringEmail address of the user.
statustruestringStatus of the user's account. Usually active. Possible values: active, inactive
invitedtruebooleanIndicates whether an invitation has been sent to the user or not. Usually true.
confirmedtruebooleanIndicates whether the user's account has been confirmed or not.
phone_numberfalsestringContact phone number of the user.
roletruestringRole of the user. Notice that this attribute has no connection with role based access control and permissions. It indicates whether the user is an admin or a regular user. Possible values: user, admin
rolesfalsearrayAn array of roles assigned to the user. Each entry in the array includes a unique identifier of the role and it's name. You can expect unique values in the array. RBAC API is not yet public.
team_nametruestringName of the team the user belongs to.
grouptrueobjectGroup the user belongs to. The group entry includes a unique identifier and a name.
reports_totruenumberUnique identifier of the manager of the user.
timezonefalsestringTimezone of the user as the offset from Coordinated Universal Time (UTC) in the format `UTC(+
created_attruestringDate and time of creation in UTC (ISO8601 format).
updated_attruestringDate and time of the last update in UTC (ISO8601 format).
deleted_attruestringDate and time of deletion in UTC (ISO8601 format) in case the user has been deleted.
zendesk_user_idtruestringIf your Sell account is linked to a Zendesk account, the user will have a Zendesk user ID.
identity_typefalsestringThe user can be either a person (an agent) or an integration (an internal system user). Possible values: person, integration

Retrieve all users

GET /v2/users

Returns all users, according to the parameters provided.

Parameters

NameRequiredTypeInDescription
pagefalsenumberQueryPage number to start from. Page numbering starts at 1, and omitting the page parameter will return the first page.
per_pagefalsenumberQueryNumber of records to return per page. The default limit is 25, and the maximum number that can be returned is 100.
sort_byfalsestringQueryA field to sort by. The default order is ascending. If you want to change the sort order to descending, append :desc to the field e.g. sort_by=name:desc. Possible values: id, name, created_at, updated_at
idsfalsestringQueryComma-separated list of user IDs to be returned in a request.
namefalsestringQueryName of the user. This parameter is used in a strict sense.
emailfalsestringQueryEmail of the user. This parameter is used in a strict sense.
rolefalsestringQueryRole of user to search for. Possible values: user, admin
role_idfalsenumberQueryThe unique identifier of the role.
statusfalsestringQueryStatus of user accounts to search for. Possible values: active, inactive
confirmedfalsebooleanQueryIndicator whether to return only confirmed user accounts or not.
zendesk_user_idsfalsestringQueryComma-separated list of Zendesk user IDs. If your Sell account is linked to a Zendesk account, the user will have a Zendesk user ID.
identity_typefalsestringQueryThe user can be either a person (an agent) or an integration (an internal system user). Possible values: person, integration

Allowed for

  • Agents

Using cURL

curl -v -X GET https://api.getbase.com/v2/users?role=user&status=active&confirmed=true \-H "Accept: application/json" \-H "Authorization: Bearer $ACCESS_TOKEN"

Example response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8Content-Language: en
{  "items": [    {      "data": {        "id": 2,        "name": "Mark Johnson",        "email": "[email protected]",        "status": "active",        "invited": true,        "confirmed": true,        "role": "user",        "created_at": "2014-08-27T16:32:56Z",        "updated_at": "2014-08-27T17:32:56Z",        "deleted_at": null,        "roles": [          {            "id": 1,            "name": "Closer"          }        ],        "phone_number": "508-778-6516",        "timezone": "UTC-05:00",        "reports_to": 1,        "team_name": "Mark Johnson's Team",        "group": {          "id": 1,          "name": "Closers A Group"        }      },      "meta": {        "type": "user"      }    }  ],  "meta": {    "type": "collection",    "count": 1,    "links": {      "self": "http://api.getbase.com/v2/users.json"    }  }}

Retrieve a single user

GET /v2/users/:id

Returns a single user according to the unique user ID provided. If the specified user does not exist, this query returns an error.

Parameters

NameRequiredTypeInDescription
idtruenumberQueryUnique identifier of the user.

Allowed for

  • Agents

Using cURL

curl -v -X GET https://api.getbase.com/v2/users/2 \-H "Accept: application/json" \-H "Authorization: Bearer $ACCESS_TOKEN"

Example response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8Content-Language: en
{  "data": {    "id": 2,    "name": "Mark Johnson",    "email": "[email protected]",    "status": "active",    "invited": true,    "confirmed": true,    "role": "user",    "created_at": "2014-08-27T16:32:56Z",    "updated_at": "2014-08-27T17:32:56Z",    "deleted_at": null,    "roles": [      {        "id": 1,        "name": "Closer"      }    ],    "phone_number": "508-778-6516",    "timezone": "UTC-05:00",    "reports_to": 1,    "team_name": "Mark Johnson's Team",    "group": {      "id": 1,      "name": "Closers A Group"    }  },  "meta": {    "type": "user"  }}

Retrieve an authenticating user

GET /v2/users/self

Returns a single authenticating user, according to the authentication credentials provided.

Allowed for

  • Agents

Using cURL

curl -v -X GET https://api.getbase.com/v2/users/self \-H "Accept: application/json" \-H "Authorization: Bearer $ACCESS_TOKEN"

Example response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8Content-Language: en
{  "data": {    "id": 2,    "name": "Mark Johnson",    "email": "[email protected]",    "status": "active",    "invited": true,    "confirmed": true,    "role": "user",    "created_at": "2014-08-27T16:32:56Z",    "updated_at": "2014-08-27T17:32:56Z",    "deleted_at": null,    "roles": [      {        "id": 1,        "name": "Closer"      }    ],    "phone_number": "508-778-6516",    "timezone": "UTC-05:00",    "reports_to": 1,    "team_name": "Mark Johnson's Team",    "group": {      "id": 1,      "name": "Closers A Group"    }  },  "meta": {    "type": "user"  }}