Get user

Returns one user by id or identifier.


Method

GET

Path

/v1/users/single

This endpoint returns a single user from your project by id or identifier.

It’s possible to fetch anonymous, as well as identified users with this endpoint.

Headers

Authorization

required

Bearer token for a project API key. This endpoint returns data for that project only.

Example: Bearer vem_abcdefghijklmnopqrstuvwxyz123456

Query Parameters

id

string optional

Vemetric's internal user ID. You have to either provide id or identifier.

Example: 123

identifier

string optional

User identifier value. You have to either provide identifier or id.

Example: your-user-id

Responses

200 Success
application/json

user

Description
Resolved user row.
Type
object

id

Description
Vemetric's internal user ID.
Type
string
Example
"123"

identifier

Description
User identifier if available (the value you provided to identify the user).
Type
string | null
Example

displayName

Description
User display name if available.
Type
string | null
Example
"John Doe"

country

Description
ISO-3166 alpha-2 country code, or null when unknown.
Type
string | null
Example
"US"

city

Description
User city, or null when unknown.
Type
string | null
Example
"Berlin"

lastSeenAt

Description
UTC timestamp of the latest activity for this user within the selected period.
Type
string<pattern:^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$> | null
Example
"2026-01-19T12:30:00Z"

avatarUrl

Description
Avatar URL if available.
Type
string | null
Example
"https://cdn.example.com/avatar.png"

data

Description
Data attributes collected for this user.
Type
object
Example
{"plan":"pro","company":"Vemetric"}

anonymous

Description
Whether the user is anonymous (not identified).
Type
boolean
Example
false


400 Bad request - invalid request payload or parameters
application/json

error

Description
Validation error details.
Type
object

code

Description
Machine-readable validation error code.
Type
"VALIDATION_ERROR"

message

Description
Human-readable validation summary.
Type
string

details

Description
Per-field validation issues.
Type
array<object>
Show nested properties (2)

field

Description
Path to the invalid request field.
Type
string
Example
"groupBy.0"

message

Description
Validation error message for the field.
Type
string



401 Unauthorized - invalid or revoked API key
application/json

error

Description
Error details.
Type
object

code

Description
Machine-readable error code.
Type
"UNAUTHORIZED"

message

Description
Human-readable error message.
Type
string


404 User was not found
application/json

error

Description
Error details.
Type
object

code

Description
Machine-readable error code.
Type
"USER_NOT_FOUND"

message

Description
Human-readable error message.
Type
string


429 Rate limit exceeded
application/json

error

Description
Error details.
Type
object

code

Description
Machine-readable error code.
Type
"RATE_LIMIT_EXCEEDED"

message

Description
Human-readable error message.
Type
string


500 Unexpected internal error
application/json

error

Description
Error details.
Type
object

code

Description
Machine-readable error code.
Type
"INTERNAL_SERVER_ERROR"

message

Description
Human-readable error message.
Type
string


Ready to understand your users?

Start tracking
Pricing About Documentation Customers Changelog Blog