List RUM sessions

List a RUM application's sessions that have a session replay in a time range, most recently active first. Needs a role with View sessions and replays under Applications. You watch a session replay in the web app, at the session's url. To export a recording, list the session's segments.

GET https://errors.betterstack.com/api/v4/applications/{application_id}/sessions

URL parameters

application_id
required string

Query parameters

from
datetime
to
datetime
user_id
string
group_id
string
state
string
has_errors
boolean
order_by
string
page
integer
per_page
DEFAULT 50 integer
team_id
string

Headers

Authorization
required string

Results are paginated

Use pagination.next and pagination.prev to move through pages or jump to a specific one using page and per_page. See Pagination.

200

Response body

{
  "data": [
    {
      "id": "c682c012-26e6-40ce-bb45-5e6e7f5a8c0f",
      "type": "rum_session",
      "attributes": {
        "application_id": "123456",
        "user_identifier": "user_123",
        "user_name": "jane@example.com",
        "group_id": "456",
        "group_name": "Acme Inc.",
        "country": "Czechia",
        "city": "Prague",
        "browser": "Chrome",
        "os": "macOS",
        "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
        "first_url": "https://shop.example.com/",
        "last_url": "https://shop.example.com/checkout",
        "page_count": 4,
        "click_count": 12,
        "error_count": 1,
        "replay_count": 1,
        "first_seen_at": "2026-11-23T17:00:12.000Z",
        "last_seen_at": "2026-11-23T17:05:40.000Z",
        "duration_seconds": 328.0,
        "state": "unresolved",
        "url": "https://rum.betterstack.com/team/t12345/sessions/c682c012-26e6-40ce-bb45-5e6e7f5a8c0f?rf=1795483200000000&rt=1795483528000000&s=123456"
      }
    }
  ],
  "pagination": {
    "first": "https://errors.betterstack.com/api/v4/applications/123456/sessions?page=1",
    "last": "https://errors.betterstack.com/api/v4/applications/123456/sessions?page=1",
    "prev": null,
    "next": null,
    "total_count": 1
  }
}
401

Response 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"
}
403
404

Response body

{
  "errors": "Resource with the provided ID was not found"
}
422

Response body

{
  "errors": "Sorry, some values are incorrect",
  "invalid_values": {
    "state": "state must be one of all, unresolved, resolved."
  }
}

Response attributes

id
string
type
string
application_id
string
user_identifier
string or null
user_name
string or null
group_id
string or null
group_name
string or null
country
string or null
city
string or null
browser
string or null
os
string or null
user_agent
string or null
first_url
string or null
last_url
string or null
page_count
integer
click_count
integer
error_count
integer
replay_count
integer
first_seen_at
datetime or null
last_seen_at
datetime or null
duration_seconds
number or null
state
string
url
string
pagination.first
string
pagination.last
string
pagination.prev
string or null
pagination.next
string or null
pagination.total_count
integer

Example cURL

List sessions with errors
curl --request GET \
  --url "https://errors.betterstack.com/api/v4/applications/123456/sessions?has_errors=true" \
  --header "Authorization: Bearer $TOKEN"