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

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)