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

# Create a session

`POST /v1/sessions`

## Request

- Base URL: `https://api.traversal.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.traversal.com/v1/sessions`
- Auth: none declared

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`` and ``ultra`` tiers are reserved for internal surfaces and are 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

- `400`: The request contains an invalid value.
- `4XX`: Client error returned in the V1 error envelope.

## Changes

> 66 revisions in range; 9 not diffed.

- **2026-08-26** `6ee9e975dda2`: 2 info
  - added the non-success response with the status `400`
  - removed the non-success response with the status `422`

[Operation history](https://skmtc.dev/traversal/apis/traversal-api/changes/v1/sessions/post.md)

---

[API](https://skmtc.dev/traversal/apis/traversal-api.md) - [All operations](https://skmtc.dev/traversal/apis/traversal-api/llms.txt) - [OpenAPI document](https://skmtc.dev/traversal/apis/traversal-api/revisions/31e1a8b7cf89?raw)
