---
title: "Create a session"
method: POST
path: "/v1/sessions"
tags: ["External API"]
---

# Create a session

`POST /v1/sessions`

Start a new investigation session. Returns 200 if an identical idempotency key was already used.

## Request body

- CreateSessionRequest — Create a new investigation session. Starts an asynchronous investigation based on the provided input. The session begins in the `running` state and transitions to `idle` once the initial investigation completes. To safely retry failed requests, supply an `idempotency_key`. If a session with the same key already exists, the existing session is returned with a `200` status instead of `201`.
  - `title` string, nullable — A short, human-readable label for the session. If omitted, Traversal generates one automatically.
  - `input` string, required — The incident description or question to investigate. This is the primary context Traversal uses to begin its analysis.
  - `time` string, nullable — ISO-8601 timestamp indicating when the incident occurred. Helps Traversal scope its investigation to the relevant time window.
  - `idempotency_key` string, required — A unique client-generated key to ensure idempotent session creation. If a session with this key already exists, it is returned instead of creating a duplicate.
  - `thinking_mode` 'auto' | 'deep' | 'fast' — Investigation depth exposed on the public V1 API. A deliberately narrower contract than the internal ``ThinkingMode``: the ``lightning`` tier is reserved for the MCP surface and is not offered here, so unsupported values are rejected at request-parse time rather than at runtime. Values mirror ``ThinkingMode`` so the mapping stays in lockstep.

## Response `201`

Successful Response

- SessionResponse — Represents an investigation session. A session is the top-level resource for an investigation. It tracks the current status, the original input, and optionally includes the full conversation history.
  - `id` string, required — Unique identifier for the session.
  - `status` string, required — Current lifecycle state of the session. One of: `running` (investigation in progress), `idle` (investigation complete, ready for follow-ups), `follow_up_running` (processing a follow-up message), `cancelled`, or `failed`.
  - `title` string, nullable — Human-readable session title. Set via the `title` field on creation, or auto-generated by Traversal.
  - `input` string, required — The original incident description or question that initiated this session.
  - `created_at` string, date-time, required — Timestamp when the session was created, in UTC.
  - `updated_at` string, date-time, nullable — Timestamp when the session was last updated, in UTC. Null if the session has not been updated since creation.
  - `messages` MessageResponse[], nullable — Ordered list of messages in the session's conversation history. Only populated when retrieving a single session via `GET /v1/sessions/{session_id}`.
    - `id` string, required — Unique identifier for this message.
    - `role` 'user' | 'assistant', required — The role of a message author.
    - `markdown_content` string, required — The message content, formatted as Markdown. Assistant messages may contain structured analysis with headings, lists, and code blocks.
    - `confidence` 'High' | 'Medium' | 'Low', nullable — Overall confidence in the assistant's analysis. Present for RCA assistant messages when available.
    - `confidence_explanation` string, nullable — Explanation of the assistant's confidence level. Present for RCA assistant messages when available.
    - `created_at` string, date-time, required — Timestamp when the message was created, in UTC.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/traversal/apis/fastapi.md) · [All operations](https://skmtc.net/traversal/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/traversal/fastapi/revisions/2134ebffd1ef/schema)
