# Get a RUM user

Get one signed-in user of a RUM application, with their activity in a time range.

[endpoint]
method = "GET"
base_url = "https://errors.betterstack.com"
path = "/api/v4/applications/{application_id}/users/{id}"

[[path_param]]
name = "application_id"
required = true
type = "string"
description = "The RUM application the user was seen in."

[[path_param]]
name = "id"
required = true
type = "string"
description = "The user's `id` from listing RUM users, the user ID or e-mail the application sent."

[[query_param]]
name = "from"
type = "datetime"
description = "Start of the time range in ISO 8601. Defaults to 14 days before `to`. RUM data is kept for 90 days, so an earlier `from` counts from 90 days ago."

[[query_param]]
name = "to"
type = "datetime"
description = "End of the time range in ISO 8601. Defaults to now. Must be after `from` and within the last 90 days."

[[query_param]]
name = "team_id"
type = "string"
description = "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."

[[header]]
name = "Authorization"
description = "Bearer `$TOKEN`"
required = true
type = "string"
[/endpoint]

[responses]
[[response]]
status = 200
description = "Returns the RUM user."
body = '''
{
  "data": {
    "id": "user_123",
    "type": "rum_user",
    "attributes": {
      "application_id": "123456",
      "name": "jane@example.com",
      "group_id": "456",
      "group_name": "Acme Inc.",
      "country": "Czechia",
      "city": "Prague",
      "referrer": "google",
      "utm": {
        "source": "newsletter",
        "campaign": "launch"
      },
      "first_seen_at": "2026-11-10T08:12:44.000Z",
      "last_seen_at": "2026-11-23T17:03:56.000Z",
      "error_count": 3,
      "session_count": 5,
      "sessions_url": "https://rum.betterstack.com/team/t12345/sessions#/?q=user.identifier%3D%22user_123%22&s=123456"
    }
  }
}
'''

[[response]]
status = 401
description = "The API token is missing or invalid."
body = '''
{
  "errors": "Invalid Team API token. How to find your Team API token: https://betterstack.com/docs/logs/api/getting-started/#obtaining-a-logtail-api-token"
}
'''

[[response]]
status = 403
description = "Your role doesn't allow viewing this, or the token can't be used for this API."

[[response]]
status = 404
description = "No application with that ID, or the user wasn't seen in the time range."
body = '''
{
  "errors": "Resource with the provided ID was not found"
}
'''

[[response]]
status = 422
description = "A `from` or `to` that isn't ISO 8601, or a `to` that isn't after `from` or is more than 90 days ago. `invalid_values` names the attribute. An unknown query parameter is listed in `invalid_attributes`."
body = '''
{
  "errors": "Sorry, some values are incorrect",
  "invalid_values": {
    "to": "to must be after from."
  }
}
'''
[/responses]

[params]
title = "Response attributes"

[[param]]
name = "id"
type = "string"
description = "The ID of the RUM user, such as `user_123`."

[[param]]
name = "type"
type = "string"
description = "Always `rum_user`."

[[param]]
name = "application_id"
type = "string"
description = "The application the user was seen in."

[[param]]
name = "name"
type = "string or null"
description = "The user's latest `email`, or their `username` or IP address when there's no e-mail, as the Users page shows it. `null` when the application sent none of them."

[[param]]
name = "group_id"
type = "string or null"
description = "The ID of the user's latest group, such as their company. `null` when the application sent none."

[[param]]
name = "group_name"
type = "string or null"
description = "The name of the user's latest group. `null` when the application sent none."

[[param]]
name = "country"
type = "string or null"
description = "The country the user was last seen in. `null` when it isn't known."

[[param]]
name = "city"
type = "string or null"
description = "The city the user was last seen in. `null` when it isn't known."

[[param]]
name = "referrer"
type = "string or null"
description = "Where the user's latest visit came from. `null` when it isn't known."

[[param]]
name = "utm"
type = "object"
description = "The `utm_` campaign parameters of the user's latest visit, keyed without the prefix as `source`, `medium`, `campaign`, `term` and `content`. Holds only the ones sent. Each value is a string."

[[param]]
name = "first_seen_at"
type = "datetime or null"
description = "When the user was first seen in the time range. In ISO 8601 format, such as `2026-07-01T12:00:00Z`."

[[param]]
name = "last_seen_at"
type = "datetime or null"
description = "When the user was last seen in the time range. In ISO 8601 format, such as `2026-07-01T12:00:00Z`."

[[param]]
name = "error_count"
type = "integer"
description = "Number of errors the user ran into in the time range."

[[param]]
name = "session_count"
type = "integer"
description = "Number of the user's sessions with a session replay in the time range."

[[param]]
name = "sessions_url"
type = "string"
description = "Link to the Sessions page in the Better Stack web app, filtered to this user."
[/params]

#### Example cURL

```shell
[label Get a user]
curl --request GET \
  --url https://errors.betterstack.com/api/v4/applications/123456/users/user_123 \
  --header "Authorization: Bearer $TOKEN"
```
