POST
/
sessions
curl --request POST \
  --url https://api.devin.ai/v1/sessions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "prompt": "Review the pull request at https://github.com/example/repo/pull/123",
  "idempotent": true
}'
{
  "session_id": "devin-xxx",
  "url": "https://app.devin.ai/sessions/xxx",
  "is_new_session": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request body for creating a new Devin session

prompt
string
required

The task description for Devin

snapshot_id
string | null

ID of a machine snapshot to use

playbook_id
string | null

ID of a playbook to follow

unlisted
boolean | null

Whether the session should be unlisted

idempotent
boolean | null

Enable idempotent session creation

max_acu_limit
integer | null

Maximum ACU limit for the session

planning_mode_agency
enum<string> | null

Planning mode agency setting. Defaults to auto_confirm.

Available options:
auto_confirm,
sync_confirm
secret_ids
string[] | null

List of secret IDs to use. If None, use all secrets. If empty list, use no secrets.

knowledge_ids
string[] | null

List of knowledge IDs to use. If None, use all knowledge. If empty list, use no knowledge.

tags
string[] | null

List of tags to add to the session.

title
string | null

Custom title for the session. If None, a title will be generated automatically.

Response

200
application/json
Session created

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)