Skip to main content
GET
/
v2
/
users
/
{userId}
Get a single User
curl --request GET \
  --url https://api.affinity.co/v2/users/{userId} \
  --header 'Authorization: Bearer <token>'
{
  "id": 1073741824,
  "firstName": "<string>",
  "lastName": "<string>",
  "primaryEmailAddress": "jsmith@example.com",
  "photoUrl": "<string>",
  "emailAddresses": [
    "jsmith@example.com"
  ],
  "role": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://developer.affinity.co/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

userId
integer<int32>
required

User ID

Required range: 1 <= x <= 2147483647

Response

OK

An internal user in your organization, including their name, primary email address, all email addresses, photo URL, account status, and account role.

id
integer<int32>
required

The user's unique identifier

Required range: 1 <= x <= 2147483647
Example:

1

firstName
string
required

The user's first name

Example:

"Jane"

lastName
string | null
required

The user's last name

Example:

"Doe"

primaryEmailAddress
string<email> | null
required

The user's primary email address

Example:

"jane.doe@acme.co"

photoUrl
string<uri> | null
required

URL of the user's profile photo

Example:

"https://assets.affinity.co/img/avatars/jane-doe.png"

status
enum<string>
required

The user's account status.

  • active: the user can sign in and use Affinity.
  • invited: the user has been invited to the product but has not yet accepted the invitation and thus cannot have taken any actions.
  • deactivated: the user was once active but has been deactivated and can no longer use the product.
Available options:
active,
invited,
deactivated
Example:

"active"

emailAddresses
string<email>[]

All of the user's email addresses. Only returned when the authenticated user has the "Manage Users" permission.

Maximum array length: 100
Example:
["jane.doe@acme.co", "janedoe@gmail.com"]
role
string

The user's account role. Only returned when the authenticated user has the "Manage Users" permission.

Example:

"standard"