# Devin

> Integrate with Devin AI to create sessions and execute coding tasks.

Source: https://cotera.co/docs/reference/tools/individual-tools/devin

---

**Authentication Type:** API Key\
**Description:** Integrate with Devin AI to create sessions and execute coding tasks.

***

## Authentication

To authenticate, you'll need a Devin API key. Learn how to create one in the [Devin API documentation](https://docs.devin.ai/api-reference/overview).

***

## Sessions

Operations for Devin AI sessions.

### Create Session

Creates a new Devin session with a prompt to start a coding task.

**Operation Type:** Mutation (Write)

**Parameters:**

* **prompt** `string` (required): The prompt to send to Devin for session creation
* **idempotent** `boolean` (required): Whether the session should be created idempotently

**Returns:**

* **sessionId** `string`: The ID of the created Devin session
* **url** `string`: The URL of the created Devin session
* **isSessionNew** `boolean` (nullable): Whether the session is new

**Example Usage:**

```json
{
  "prompt": "Create a Python web scraper that extracts product information from an e-commerce site, stores the data in a SQLite database, and generates a CSV report of price changes over time.",
  "idempotent": true
}
```

### Send Prompt

Send a follow-up message or prompt to an existing Devin session.

**Operation Type:** Mutation (Write)

**Parameters:**

* **sessionId** `string` (required): The ID of the Devin session to send the prompt to
* **message** `string` (required): The message or prompt to send to the session

**Returns:**

* **success** `boolean`: Whether the prompt was sent successfully
* **sessionId** `string`: The ID of the session

**Example Usage:**

```json
{
  "sessionId": "devin_session_12345abcde",
  "message": "Add unit tests for the web scraper module and make sure edge cases are covered."
}
```

### Get Session

Retrieves details about a Devin session including status and results.

**Operation Type:** Query (Read)

**Parameters:**

* **sessionId** `string` (required): The ID of the Devin session to retrieve

**Returns:**

* **sessionId** `string`: The ID of the Devin session
* **status** `string`: The current status of the session
* **title** `string`: The title of the session
* **createdAt** `string`: The timestamp of the session creation
* **updatedAt** `string`: The timestamp of the last session update
* **snapshotId** `string` (nullable): The ID of the snapshot
* **playbookId** `string` (nullable): The ID of the playbook
* **tags** `array of strings`: The tags of the session
* **structuredOutput** `object`: Session results
  * **result** `string`: The result of the session
* **statusEnum** `string`: The status of the session
* **messages** `array of objects`: The messages of the session
  * **type** `string`: The type of the message
  * **message** `string`: The message content
  * **username** `string`: The username of the message
  * **origin** `string`: The origin of the message

**Example Usage:**

```json
{
  "sessionId": "devin_session_12345abcde"
}
```

***

## Common Use Cases

**Automated Software Development:**

* Generate complete applications and microservices from high-level requirements and specifications
* Create data processing pipelines and ETL scripts with database integration and error handling
* Build web scrapers, APIs, and automation tools with comprehensive testing and documentation

**Code Generation and Prototyping:**

* Rapidly prototype complex algorithms and data structures for proof-of-concept development
* Generate boilerplate code and project scaffolding for new applications and frameworks
* Create custom utilities and helper functions tailored to specific business requirements

**Technical Task Automation:**

* Automate repetitive coding tasks like database migrations, configuration updates, and deployment scripts
* Generate test suites and quality assurance code for existing applications and systems
* Create documentation and code analysis tools for legacy system maintenance and modernization

**Development Workflow Integration:**

* Monitor session progress and results for integration into CI/CD pipelines and development workflows
* Track coding task completion and quality metrics through session status and structured output
* Manage multiple concurrent development tasks using idempotent session creation and status monitoring

