---
title: "Create Session"
method: POST
path: "/companies/{company_id}/sessions"
tags: ["sessions"]
---

# Create Session

`POST /companies/{company_id}/sessions`

## Request

- Base URL: `https://api.nanocorp.so` (the document declares no server; this is the origin it was published from)
- URL: `https://api.nanocorp.so/companies/{company_id}/sessions`
- Auth: HTTP bearer

Create a new session and its first turn from a user message.

## Path parameters

- `company_id` string, uuid, required

## Headers

- `X-Posthog-Session-Id` string, nullable
- `X-Client-Mobile` string, nullable

## Request body

- CreateSessionRequest
  - `message` string
  - `attachments` TurnAttachment[]
    - `file_id` string, uuid, required
  - `dictated` boolean
  - `tz` string, nullable
  - `messages` TurnMessagePart[], nullable
    - `message` string
    - `attachments` TurnAttachment[]
      - `file_id` string, uuid, required
  - `prompt_source` string, nullable

## Response `201`

Successful Response

- SessionTurnCreatedResponse
  - `session` SessionResponse, required
    - `id` string, required
    - `company_id` string, required
    - `trigger` 'user' | 'schedule' | 'routine' | 'founding_interview' | 'outcome', required
    - `title` string, nullable
    - `rotated_from_session_id` string, nullable
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
  - `turn` SessionTurnResponse, required
    - `id` string, required
    - `session_id` string, nullable
    - `status` 'pending' | 'running' | 'completed' | 'failed' | 'interrupted' | 'waiting', required
    - `trigger` 'manual' | 'ceo_agent' | 'cron' | 'founding' | 'birth' | 'ask_answer' | 'routine' | 'platform' | 'founding_setup' | 'founding_build' | 'support' | 'outcome_start' | 'outcome_check' | 'outcome_continue' | 'outcome_message' | 'outcome_compact', required
    - `interrupt_requested_at` string, date-time, nullable
    - `error_message` string, nullable
    - `created_at` string, date-time, required
    - `started_at` string, date-time, nullable
    - `completed_at` string, date-time, nullable
    - `continues_run_id` string, nullable
    - `routine_task_ids` string[]
    - `wake_message` TurnWakeMessage: The message that woke a goal's attempt (spec 2026-10-19 OUTCOME_SESSIONS, Cross-session messaging): the turn's own prompt is only the attempt's /goal, so the thread quotes this instead.
      - `sender` string, required
      - `text` string, required

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-20** `f9255294952f`: 1 info
  - added the optional property `turn/wake_message` to the response with the `201` status
- **2026-10-20** `85afb5563d7a`: 6 warning
  - added the new `outcome` enum value to the `session/trigger` response property for the response status `201`
  - added the new `outcome_check` enum value to the `turn/trigger` response property for the response status `201`
  - added the new `outcome_compact` enum value to the `turn/trigger` response property for the response status `201`
  - added the new `outcome_continue` enum value to the `turn/trigger` response property for the response status `201`
  - …2 more
- **2026-10-07** `33b623259808`: 1 warning
  - added the new `support` enum value to the `turn/trigger` response property for the response status `201`
- **2026-09-28** `9c76d9123b22`: 1 warning
  - added the new `founding_interview` enum value to the `session/trigger` response property for the response status `201`
- **2026-09-23** `c4109d3755e1`: 2 warning
  - added the new `founding_build` enum value to the `turn/trigger` response property for the response status `201`
  - added the new `founding_setup` enum value to the `turn/trigger` response property for the response status `201`

[Operation history](https://skmtc.dev/nanocorp/apis/nanocorp-api/changes/companies/:company_id/sessions/post.md)

---

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