---
title: "Get session token"
method: GET
path: "/v1/threads/{threadId}/session-token"
tags: ["threads"]
---

# Get session token

`GET /v1/threads/{threadId}/session-token`

Fetch the current session identity token for a captain thread. The caller must have access to the project that owns the thread. The same token is also written inside the captain VM to `/etc/capy/session-token` with permissions `0600`, so code running inside the VM can read it locally. A `410` response means the session has already ended. A `422` response with code `session_not_ready` means the token has not been minted yet during initial bootstrap; retry with backoff.

## Path parameters

- `threadId` string, required

## Response `200`

Success

- SessionTokenResponse
  - `token` string, required — Opaque session identity token. This value is a JWT and is typically 700-1000 bytes long.
  - `expiresAt` string, date-time, required
  - `issuedAt` string, date-time, required

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not found
- `410` — Gone
- `422` — Validation error
- `500` — Internal error

---

[API](https://skmtc.dev/capy/apis/capy-api.md) · [All operations](https://skmtc.dev/capy/apis/capy-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/capy/capy-api/revisions/c9ea28cb32b6/schema)
