Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.masker.dev/llms.txt

Use this file to discover all available pages before exploring further.

Returns sessions for a specific agent, ordered by start time (newest first). This endpoint is equivalent to GET /sessions with agent_id pre-applied, but also supports additional agent-scoped filters like min_redactions. Use it to audit activity for a single agent without having to filter a cross-account session list.

Endpoint

GET /api/v1/agents/{agent_id}/sessions
Requires masker_session authentication.

Path parameters

agent_id
string
required
The agent’s ID in agt_* ULID format, e.g. agt_01HYZ....

Query parameters

limit
number
default:"25"
Maximum number of sessions to return. Accepted range: 1–100.
cursor
string
Pagination cursor from a previous response’s next_cursor. Omit to start from the first page.
since
string
default:"24h"
Return only sessions that started within this window. Accepts a duration string (1h, 24h, 7d, 30d) or an ISO 8601 UTC timestamp.
status
string
Filter by session outcome. One of ok, error, or partial. Omit to return sessions of all statuses.
min_redactions
number
default:"0"
Return only sessions with at least this many PHI redactions.

Response fields

data
object[]
required
Array of session summary objects.
next_cursor
string | null
required
Cursor for the next page. null when you have reached the last page.

Example

curl -H "Cookie: masker_session=ey..." \
  "https://masker-voice.fly.dev/api/v1/agents/agt_01HYZ.../sessions?since=7d&limit=100"
Response
{
  "data": [
    {
      "id": "sess_01HYZ...",
      "agent_id": "agt_01HYZ...",
      "started_at": "2026-05-03T21:14:32Z",
      "ended_at": "2026-05-03T21:14:32.794Z",
      "duration_ms": 794,
      "status": "ok",
      "redaction_count": 4,
      "redactions_by_kind": {"PHONE": 1, "NAME": 2, "DOB": 1}
    }
  ],
  "next_cursor": "eyJ..."
}

Errors

StatusCodeMeaning
401unauthenticatedMissing or invalid masker_session cookie
404agent_not_foundNo agent with this ID exists in your account
422validation_failedBad query parameter value, e.g. malformed since