Skip to content

Get a user

GET
/users/{userId}
curl --request GET \
--url https://optlo.com/api/v1/users/example \
--header 'Authorization: Bearer <token>'

Requires users:read.

userId
required
string

Unique identifier for the user.

Success

Media typeapplication/json
Show child attributesHide child attributes
id
required

Unique identifier for the user.

string
name
required

User’s display name.

nullable string
email
required

User’s email address.

nullable string
externalId
required

User identifier in your system. String and numeric IDs are distinct.

nullable
string
or
number
avatarUrl
required

URL of the user’s avatar image.

nullable string
attrs
required

Custom attributes attached to the user, such as plan or company. Values can be strings, numbers, booleans, or null.

nullable dictionary
Show child attributesHide child attributes
key
additional properties
nullable
string
or
number
or
boolean
createdAt
required

Time the user was created.

string format: date-time
lastVisitedAt
required

Time of the user’s most recent visit. Null if no visit has been recorded.

nullable string format: date-time

Example

{
"id": "user_kR7mP3xB9nQ2vL5z",
"name": "Sam Rivera",
"email": "sam@example.com",
"externalId": "customer_1042",
"avatarUrl": null,
"attrs": {
"plan": "pro",
"company": "Acme"
},
"createdAt": "2026-10-13T09:00:00.000Z",
"lastVisitedAt": "2026-10-13T09:05:00.000Z"
}