# Devin (/integrations/devin)





{/* MANUAL-CONTENT-START:intro */}

Use [Devin](https://devin.ai/) to assign coding tasks and manage their sessions from a workflow. **Create Session** accepts a prompt, optional playbook, ACU (Autonomous Compute Unit) limit, and tags.

Use **Get Session** to poll status before consuming pull requests or structured output; session details also report resource use. **List Sessions** supports pagination. **Send Message** supplies context or redirects an active session and resumes suspended sessions automatically. Set an ACU limit when you need a spending boundary.

{/* MANUAL-CONTENT-END */}

## Use the block [#usage-instructions]

Create coding sessions, list or inspect their status and results, and send messages to guide active or suspended work. Use playbooks and ACU limits for repeatable tasks and spending control.

## Actions [#actions]

### Devin Create Session [#devin-create-session]

Create a new Devin session with a prompt. Devin will autonomously work on the task described in the prompt.

<ReferenceDetails>
  #### Input [#input]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Devin API key (service user credential starting with cog\_) |
  | `orgId` | string | Yes | Devin organization ID (prefixed with org-) |
  | `prompt` | string | Yes | The task prompt for Devin to work on |
  | `playbookId` | string | No | Optional playbook ID to guide the session |
  | `maxAcuLimit` | number | No | Maximum ACU limit for the session |
  | `tags` | string | No | Comma-separated tags for the session |

  #### Output [#output]

  | Parameter | Type | Description |
  | - | - | - |
  | `sessionId` | string | Unique identifier for the session |
  | `url` | string | URL to view the session in the Devin UI |
  | `status` | string | Session status (new, claimed, running, exit, error, suspended, resuming) |
  | `statusDetail` | string | Detailed status (working, waiting\_for\_user, waiting\_for\_approval, finished, inactivity, etc.) |
  | `title` | string | Session title |
  | `createdAt` | number | Unix timestamp when the session was created |
  | `updatedAt` | number | Unix timestamp when the session was last updated |
  | `acusConsumed` | number | ACUs consumed by the session |
  | `tags` | json | Tags associated with the session (array of strings) |
  | `pullRequests` | json | Pull requests created during the session (\[\{pr\_url, pr\_state}]) |
  | `structuredOutput` | json | Structured output from the session |
  | `playbookId` | string | Associated playbook ID |
  | `isArchived` | boolean | Whether the session is archived |
</ReferenceDetails>

### Devin Get Session [#devin-get-session]

Retrieve details of an existing Devin session including status, tags, pull requests, and structured output.

<ReferenceDetails>
  #### Input [#input-1]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Devin API key (service user credential starting with cog\_) |
  | `orgId` | string | Yes | Devin organization ID (prefixed with org-) |
  | `sessionId` | string | Yes | The session ID to retrieve |

  #### Output [#output-1]

  | Parameter | Type | Description |
  | - | - | - |
  | `sessionId` | string | Unique identifier for the session |
  | `url` | string | URL to view the session in the Devin UI |
  | `status` | string | Session status (new, claimed, running, exit, error, suspended, resuming) |
  | `statusDetail` | string | Detailed status (working, waiting\_for\_user, waiting\_for\_approval, finished, inactivity, etc.) |
  | `title` | string | Session title |
  | `createdAt` | number | Unix timestamp when the session was created |
  | `updatedAt` | number | Unix timestamp when the session was last updated |
  | `acusConsumed` | number | ACUs consumed by the session |
  | `tags` | json | Tags associated with the session (array of strings) |
  | `pullRequests` | json | Pull requests created during the session (\[\{pr\_url, pr\_state}]) |
  | `structuredOutput` | json | Structured output from the session |
  | `playbookId` | string | Associated playbook ID |
  | `isArchived` | boolean | Whether the session is archived |
</ReferenceDetails>

### Devin List Sessions [#devin-list-sessions]

List Devin sessions in the organization. Returns up to 100 sessions by default.

<ReferenceDetails>
  #### Input [#input-2]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Devin API key (service user credential starting with cog\_) |
  | `orgId` | string | Yes | Devin organization ID (prefixed with org-) |
  | `limit` | number | No | Maximum number of sessions to return (1-200, default: 100) |
  | `after` | string | No | Pagination cursor (endCursor from a previous response) to fetch the next page |

  #### Output [#output-2]

  | Parameter | Type | Description |
  | - | - | - |
  | `sessions` | array | List of Devin sessions |
  | ↳ `sessionId` | string | Unique identifier for the session |
  | ↳ `url` | string | URL to view the session |
  | ↳ `status` | string | Session status |
  | ↳ `statusDetail` | string | Detailed status |
  | ↳ `title` | string | Session title |
  | ↳ `createdAt` | number | Creation timestamp (Unix) |
  | ↳ `updatedAt` | number | Last updated timestamp (Unix) |
  | ↳ `tags` | json | Session tags (array of strings) |
  | ↳ `acusConsumed` | number | ACUs consumed by the session |
  | ↳ `pullRequests` | json | Pull requests created during the session (\[\{pr\_url, pr\_state}]) |
  | ↳ `playbookId` | string | Associated playbook ID |
  | ↳ `isArchived` | boolean | Whether the session is archived |
  | `endCursor` | string | Pagination cursor for the next page, or null if last page |
  | `hasNextPage` | boolean | Whether more sessions are available |
  | `total` | number | Total number of sessions, if provided |
</ReferenceDetails>

### Devin Send Message [#devin-send-message]

Send a message to a Devin session. If the session is suspended, it will be automatically resumed. Returns the updated session state.

<ReferenceDetails>
  #### Input [#input-3]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Devin API key (service user credential starting with cog\_) |
  | `orgId` | string | Yes | Devin organization ID (prefixed with org-) |
  | `sessionId` | string | Yes | The session ID to send the message to |
  | `message` | string | Yes | The message to send to Devin |

  #### Output [#output-3]

  | Parameter | Type | Description |
  | - | - | - |
  | `sessionId` | string | Unique identifier for the session |
  | `url` | string | URL to view the session in the Devin UI |
  | `status` | string | Session status (new, claimed, running, exit, error, suspended, resuming) |
  | `statusDetail` | string | Detailed status (working, waiting\_for\_user, waiting\_for\_approval, finished, inactivity, etc.) |
  | `title` | string | Session title |
  | `createdAt` | number | Unix timestamp when the session was created |
  | `updatedAt` | number | Unix timestamp when the session was last updated |
  | `acusConsumed` | number | ACUs consumed by the session |
  | `tags` | json | Tags associated with the session (array of strings) |
  | `pullRequests` | json | Pull requests created during the session (\[\{pr\_url, pr\_state}]) |
  | `structuredOutput` | json | Structured output from the session |
  | `playbookId` | string | Associated playbook ID |
  | `isArchived` | boolean | Whether the session is archived |
</ReferenceDetails>

### Devin List Session Messages [#devin-list-session-messages]

List the messages exchanged in a Devin session, including messages from both the user and Devin.

<ReferenceDetails>
  #### Input [#input-4]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Devin API key (service user credential starting with cog\_) |
  | `orgId` | string | Yes | Devin organization ID (prefixed with org-) |
  | `sessionId` | string | Yes | The session ID to list messages for |
  | `limit` | number | No | Maximum number of messages to return (1-200, default: 100) |
  | `after` | string | No | Pagination cursor (endCursor from a previous response) to fetch the next page |

  #### Output [#output-4]

  | Parameter | Type | Description |
  | - | - | - |
  | `messages` | array | Messages exchanged in the session |
  | ↳ `eventId` | string | Unique identifier for the message event |
  | ↳ `source` | string | Origin of the message (devin or user) |
  | ↳ `message` | string | The message content |
  | ↳ `createdAt` | number | Unix timestamp when the message was created |
  | `endCursor` | string | Pagination cursor for the next page, or null if last page |
  | `hasNextPage` | boolean | Whether more messages are available |
  | `total` | number | Total number of messages, if provided |
</ReferenceDetails>

### Devin List Session Attachments [#devin-list-session-attachments]

List the files uploaded to or produced by a Devin session.

<ReferenceDetails>
  #### Input [#input-5]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Devin API key (service user credential starting with cog\_) |
  | `orgId` | string | Yes | Devin organization ID (prefixed with org-) |
  | `sessionId` | string | Yes | The session ID to list attachments for |

  #### Output [#output-5]

  | Parameter | Type | Description |
  | - | - | - |
  | `attachments` | array | Attachments associated with the session |
  | ↳ `attachmentId` | string | Unique identifier for the attachment |
  | ↳ `name` | string | Attachment file name |
  | ↳ `url` | string | URL to download the attachment |
  | ↳ `source` | string | Origin of the attachment (devin or user) |
  | ↳ `contentType` | string | MIME type of the attachment |
</ReferenceDetails>

### Devin Get Session Tags [#devin-get-session-tags]

Retrieve the tags currently applied to a Devin session.

<ReferenceDetails>
  #### Input [#input-6]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Devin API key (service user credential starting with cog\_) |
  | `orgId` | string | Yes | Devin organization ID (prefixed with org-) |
  | `sessionId` | string | Yes | The session ID to retrieve tags for |

  #### Output [#output-6]

  | Parameter | Type | Description |
  | - | - | - |
  | `tags` | json | Tags applied to the session (array of strings) |
</ReferenceDetails>

### Devin Append Session Tags [#devin-append-session-tags]

Add tags to a Devin session without removing existing tags (max 50 tags total).

<ReferenceDetails>
  #### Input [#input-7]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Devin API key (service user credential starting with cog\_) |
  | `orgId` | string | Yes | Devin organization ID (prefixed with org-) |
  | `sessionId` | string | Yes | The session ID to add tags to |
  | `tags` | string | Yes | Tags to append to the session (comma-separated string or array of strings) |

  #### Output [#output-7]

  | Parameter | Type | Description |
  | - | - | - |
  | `tags` | json | Updated list of tags on the session (array of strings) |
</ReferenceDetails>

### Devin Replace Session Tags [#devin-replace-session-tags]

Replace all tags on a Devin session with a new set of tags (max 50 tags).

<ReferenceDetails>
  #### Input [#input-8]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Devin API key (service user credential starting with cog\_) |
  | `orgId` | string | Yes | Devin organization ID (prefixed with org-) |
  | `sessionId` | string | Yes | The session ID to replace tags on |
  | `tags` | string | Yes | Tags that will overwrite the existing tags (comma-separated string or array of strings) |

  #### Output [#output-8]

  | Parameter | Type | Description |
  | - | - | - |
  | `tags` | json | Updated list of tags on the session (array of strings) |
</ReferenceDetails>

### Devin Archive Session [#devin-archive-session]

Archive a Devin session. Archived sessions can still be viewed but cannot be modified or resumed.

<ReferenceDetails>
  #### Input [#input-9]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Devin API key (service user credential starting with cog\_) |
  | `orgId` | string | Yes | Devin organization ID (prefixed with org-) |
  | `sessionId` | string | Yes | The session ID to archive |

  #### Output [#output-9]

  | Parameter | Type | Description |
  | - | - | - |
  | `sessionId` | string | Unique identifier for the session |
  | `url` | string | URL to view the session in the Devin UI |
  | `status` | string | Session status (new, claimed, running, exit, error, suspended, resuming) |
  | `statusDetail` | string | Detailed status (working, waiting\_for\_user, waiting\_for\_approval, finished, inactivity, etc.) |
  | `title` | string | Session title |
  | `createdAt` | number | Unix timestamp when the session was created |
  | `updatedAt` | number | Unix timestamp when the session was last updated |
  | `acusConsumed` | number | ACUs consumed by the session |
  | `tags` | json | Tags associated with the session (array of strings) |
  | `pullRequests` | json | Pull requests created during the session (\[\{pr\_url, pr\_state}]) |
  | `structuredOutput` | json | Structured output from the session |
  | `playbookId` | string | Associated playbook ID |
  | `isArchived` | boolean | Whether the session is archived |
</ReferenceDetails>

### Devin Terminate Session [#devin-terminate-session]

Terminate a Devin session. Optionally archive the session instead of permanently terminating it.

<ReferenceDetails>
  #### Input [#input-10]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Devin API key (service user credential starting with cog\_) |
  | `orgId` | string | Yes | Devin organization ID (prefixed with org-) |
  | `sessionId` | string | Yes | The session ID to terminate |
  | `archive` | boolean | No | Archive the session instead of permanently terminating it (default: false) |

  #### Output [#output-10]

  | Parameter | Type | Description |
  | - | - | - |
  | `sessionId` | string | Unique identifier for the session |
  | `url` | string | URL to view the session in the Devin UI |
  | `status` | string | Session status (new, claimed, running, exit, error, suspended, resuming) |
  | `statusDetail` | string | Detailed status (working, waiting\_for\_user, waiting\_for\_approval, finished, inactivity, etc.) |
  | `title` | string | Session title |
  | `createdAt` | number | Unix timestamp when the session was created |
  | `updatedAt` | number | Unix timestamp when the session was last updated |
  | `acusConsumed` | number | ACUs consumed by the session |
  | `tags` | json | Tags associated with the session (array of strings) |
  | `pullRequests` | json | Pull requests created during the session (\[\{pr\_url, pr\_state}]) |
  | `structuredOutput` | json | Structured output from the session |
  | `playbookId` | string | Associated playbook ID |
  | `isArchived` | boolean | Whether the session is archived |
</ReferenceDetails>
