Skip to main content
GET
JavaScript

Authorizations

X-API-KEY
string
header
required

Headers

Tenant-ID
string

The tenant identifier for multi-tenant organisations. Required when the organisation has multi-tenancy enabled. The value should be your internal ID for the tenant. Ignored for single-tenant organisations.

Path Parameters

id
string
required

ID of the user to get.

Response

Found user

A user of your application.

id
string
required

The ID of the user in your database. Must be a string.

Example:

"user-id"

email
string | null
required

The user's email address.

Example:

"user@example.com"

name
string | null
required

The name of the user.

Example:

"John Doe"

tz
string | null
required

The user's timezone.

Example:

"Europe/London"

subscribeToEmails
boolean
required

Whether the user is opted into receiving Trophy-powered emails.

Example:

true

attributes
object
required

User attributes as key-value pairs. Keys must match existing user attributes set up in the Trophy dashboard.

Example:
control
boolean
required

Whether the user is in the control group, meaning they do not receive emails or other communications from Trophy.

Example:

false

created
string<date-time>
required

The date and time the user was created, in ISO 8601 format.

Example:

"2021-01-01T00:00:00Z"

updated
string<date-time>
required

The date and time the user was last updated, in ISO 8601 format.

Example:

"2021-01-01T00:00:00Z"

deviceTokens
string[] | null

The user's device tokens.

The device token.

Example: