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

# Create a new session

`POST /v1/sessions`

Create a new Devin session. Provide a prompt to describe the task.
The session can optionally be made unlisted or idempotent.

## Request body

- CreateSessionRequest — Request body for creating a new Devin session
  - `prompt` string, required — The task description for Devin
  - `snapshot_id` string, nullable — ID of a machine snapshot to use
  - `unlisted` boolean, nullable — Whether the session should be unlisted
  - `idempotent` boolean, nullable — Enable idempotent session creation
  - `max_acu_limit` integer, nullable — Maximum ACU limit for the session
  - `secret_ids` string[], nullable — List of secret IDs to use. If None, use all secrets. If empty list, use no secrets.
  - `knowledge_ids` string[], nullable — List of knowledge IDs to use. If None, use all knowledge. If empty list, use no knowledge.
  - `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.

## Response `200`

Session created

- CreateSessionResponse — Response body returned when a session is successfully created
  - `session_id` string, required — Unique identifier for the session
  - `url` string, required — URL to view the session in the web interface
  - `is_new_session` boolean — Indicates if a new session was created (only present if idempotent=true)

## Other responses

- `400` — Bad Request
- `401` — Unauthorized - Invalid or missing API key
- `500` — Internal Server Error

---

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