---
title: "Create a new session"
method: POST
path: "/v1/sessions"
---

# Create a new session

`POST /v1/sessions`

Create a new Devin session with the specified prompt and configuration options.

## Request body

- CreateSessionParams
  - `idempotent` boolean
  - `knowledge_ids` string[], nullable — List of knowledge IDs to use. If None, use all knowledge. If empty list, use no knowledge.
  - `max_acu_limit` integer, nullable — Maximum ACU limit, must be positive
  - `playbook_id` string, nullable
  - `prompt` string, required
  - `secret_ids` string[], nullable — List of secret IDs to use. If None, use all secrets. If empty list, use no secrets.
  - `session_secrets` SessionSecretInput[], nullable — List of session-specific secrets to use. These secrets are only available in this session and are not stored in organization secrets.
    - `key` string, required
    - `sensitive` boolean
    - `value` string, required
  - `snapshot_id` string, nullable
  - `structured_output_schema` object, nullable — JSON Schema (Draft 7) for validating structured output. Max 64KB. Must be self-contained (no external $ref).
  - `tags` string[], nullable — List of tags to add to the session.
  - `title` string, nullable — Custom title for the session. If None, a title will be generated automatically.
  - `unlisted` boolean

## Response `200`

Successful Response

- CreateSessionResponse — Response body returned when a session is successfully created.
  - `is_new_session` boolean, nullable
  - `session_id` string, required
  - `url` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/devinenterprise/apis/devin-api-v1.md) · [All operations](https://skmtc.net/devinenterprise/apis/devin-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/devinenterprise/devin-api-v1/versions/e3244476af1c/schema)
