---
title: "Retrieve a session"
method: GET
path: "/api/v1/sessions/{session}"
tags: ["sessions"]
---

# Retrieve a session

`GET /api/v1/sessions/{session}`

## Request

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

Retrieve a single session by its friendly id (`session_…`) or your `externalId`. The response includes `triggerConfig` and the friendly `currentRunId` of the live run, if any.

## Response `200`

Successful request

- SessionObject: A session row.
  - `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

## Other responses

- `401`: Unauthorized request
- `404`: Session not found

## 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/:session/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)
