Users
⚠️ This endpoint is currently in BETA

Paginate through internal Users in your organization.

Returns information about each User, including name, primary email address, all email addresses, photo URL, account status, and account role.

The emailAddresses and role properties are only returned to callers with the "Manage Users" permission.

Use the optional term parameter to filter by first name, last name, or primary email address.

You can also filter users using the filter query parameter. The filter parameter is a string that you can specify conditions based on the following properties.

Property NameTypeAllowed OperatorsExamples
idint32=id=1|id=2|id=3
statusenum=status=active
get/v2/users

Request

  • Base URL
    https://api.affinity.co
  • URL
    https://api.affinity.co/v2/users
  • Auth
    HTTP bearer

Query parameters

cursorstring
Example:ICAgICAgYmVmb3JlOjo6Nw

Cursor for the next or previous page

limitinteger
Example:100

Number of items to include in the page

termstring
Example:jane

Case-insensitive search across first name, last name, and primary email address. Returns users matching the term as a substring.

filterstring

Filter options

Response

OK

Example response

{
  "data": [
    {
      "id": 1,
      "firstName": "Jane",
      "lastName": "Doe",
      "primaryEmailAddress": "jane.doe@acme.co",
      "emailAddresses": [
        "jane.doe@acme.co",
        "janedoe@gmail.com"
      ],
      "photoUrl": "https://assets.affinity.co/img/avatars/jane-doe.png",
      "status": "active",
      "role": "standard"
    }
  ],
  "pagination": {
    "prevUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgYmVmb3JlOjo6Nw",
    "nextUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgIGFmdGVyOjo6NA"
  }
}

Changes

    • info

      added authentication authorization bad-request conflict method-not-allowed not-acceptable not-found not-implemented rate-limit server timeout unprocessable-entity unsupported-media-type validation discriminator mapping keys to the / response property for the response status

    • info

      added bad-request validation discriminator mapping keys to the / response property for the response status