Create a new session
ManageOrgSessions permission at the organization level.
| Feature | Required Permission |
|---|---|
advanced_mode | UseDevinExpert |
create_as_user_id | ImpersonateOrgSessions |
advanced_mode parameter enables specialized session behaviors for automation workflows. When set, the session uses the advanced persona and the prompt is transformed based on the selected mode.
| Mode | Description | Required Parameters |
|---|---|---|
analyze | Analyze existing Devin sessions to extract insights | session_links |
create | Create a new playbook based on session analysis | None (optional: session_links) |
improve | Improve an existing playbook based on feedback | child_playbook_id |
batch | Start multiple Devin sessions for a list of tasks | child_playbook_id |
manage | Manage knowledge | None |
batch mode, you can optionally set bypass_approval to true to skip the approval step for batch session creation. This is useful for fully automated workflows where you want sessions to start immediately without manual approval.
create_as_user_id parameter allows creating a session on behalf of another user. This requires:
ImpersonateOrgSessions permissionUseDevinSessions permissionService User credential (prefix: cog_)
analyze, create, improve, batch, manage 1 - 2083JSON Schema (Draft 7) for validating structured output. Max 64KB. Must be self-contained (no external $ref).
Successful Response
new, claimed, running, exit, error, suspended, resuming Additional detail about the session's current status. When status is 'running': 'working' (actively working), 'waiting_for_user' (needs user input), 'waiting_for_approval' (awaiting action approval in safe mode), or 'finished' (task complete). When status is 'suspended': the reason for suspension such as 'inactivity', 'user_request', 'usage_limit_exceeded', 'out_of_credits', 'payment_declined', 'org_usage_limit_exceeded', or 'error'. Only populated on get/list endpoints.
working, waiting_for_user, waiting_for_approval, finished, inactivity, user_request, usage_limit_exceeded, out_of_credits, payment_declined, org_usage_limit_exceeded, error Validated structured output from the session. Only populated on get/list endpoints.