---
title: "List sessions"
method: GET
path: "/api/v1/sessions"
tags: ["sessions"]
---

# List sessions

`GET /api/v1/sessions`

## Request

- Base URL: `https://api.trigger.dev`
- URL: `https://api.trigger.dev/api/v1/sessions`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
- TypeScript: <https://skmtc.dev/triggerdotdev/apis/trigger-dev-v3-rest-api/docs/api/v1/sessions/get.ts> (a function with typed inputs; its response is checked against the schema)

List sessions in the current environment, newest first. Filter by type, tags, task identifier, external id, status, and creation window. Use cursor-based pagination with `page[after]` and `page[before]` to navigate pages.

List rows omit `triggerConfig`; retrieve a single session to read it.

## Query parameters

- `page` object
  - `size` integer: Number of sessions per page. Maximum is 100.
  - `after` string: The ID of the session to start the page after. Sets the pagination direction to forward.
  - `before` string: The ID of the session to start the page before. Sets the pagination direction to backward.
- `filter` SessionsFilter
  - `type` string[]: The session type(s) to filter by.
  - `tags` string[]: The tags to filter by.
  - `taskIdentifier` string[]: The task identifier(s) to filter by.
  - `externalId` string: Exact match on your `externalId`.
  - `status` string[]: The lifecycle status(es) to filter by.
  - `createdAt` object
    - `from` string, date-time: The start date to filter the sessions by.
    - `to` string, date-time: The end date to filter the sessions by.
    - `period` string: The period to filter the sessions by.

## Response `200`

Successful request

- ListSessionsResult
  - `data` SessionObject[]
    - `id` string, required: The session's friendly ID, prefixed with `session_`.
    - `externalId` string, nullable: Your stable identity for the session, if one was set.
    - `type` string, required: The session type discriminator.
    - `taskIdentifier` string, required: The task this session triggers runs against.
    - `triggerConfig` SessionTriggerConfig: Trigger options applied to every run a session schedules. `basePayload` is the wire payload merged into each run; the remaining fields map onto the standard trigger options.
      - `basePayload` object, required: Base payload passed to every run this session triggers. For `chat.agent` this carries `{ chatId, ...clientData }`.
      - `machine` string: Machine preset for each run, e.g. `small-1x`.
      - `queue` string: Queue to schedule runs on.
      - `tags` string[]: Tags applied to every run this session triggers.
      - `maxAttempts` integer: Maximum retry attempts per run.
      - `maxDuration` integer: Per-run wall-clock cap in seconds.
      - `lockToVersion` string: Pin every run to a specific worker version.
      - `region` string: Region to schedule runs in.
      - `idleTimeoutInSeconds` integer: Idle timeout surfaced to `chat.agent` via the wire payload.
    - `currentRunId` string, nullable: Friendly ID of the live run for this session, if any. Prefixed with `run_`. Omitted on list rows.
    - `tags` string[], required: Tags on the session row.
    - `metadata` object, nullable: Arbitrary JSON metadata, or `null` if unset.
    - `closedAt` string, date-time, nullable: When the session was closed, or `null` if open.
    - `closedReason` string, nullable: The optional reason recorded when the session was closed.
    - `expiresAt` string, date-time, nullable: The session's retention deadline, or `null` if none.
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
  - `pagination` object
    - `next` string: The session ID to start the next page after. Pass it as the `page[after]` parameter on the next request.
    - `previous` string: The session ID to start the previous page before. Pass it as the `page[before]` parameter on the next request.

## Other responses

- `400`: Invalid query parameters
- `401`: Unauthorized request

## Changes

- **2026-06-14** `6e21987d1377`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/triggerdotdev/apis/trigger-dev-v3-rest-api/changes/api/v1/sessions/get.md)

---

[API](https://skmtc.dev/triggerdotdev/apis/trigger-dev-v3-rest-api.md) - [All operations](https://skmtc.dev/triggerdotdev/apis/trigger-dev-v3-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/triggerdotdev/apis/trigger-dev-v3-rest-api/revisions/441161111493?raw)
