The Devin API enables you to integrate Devin into your applications, automate workflows, and build powerful tools. We provide three API versions, each designed for different use cases and authentication models.
API Versions
Devin provides three API versions with different capabilities and authentication requirements:
External API v1 (Org-Scoped)
The v1 API provides core session management functionality with org-scoped access.
Base URL: https://api.devin.ai/v1/*
Authentication: Personal or Service API Keys
Key Features:
- Create and manage Devin sessions
- Send messages to active sessions
- Manage secrets, knowledge, and playbooks
- Upload and download attachments
- Update session tags
Best for:
- General session automation
- User-facing integrations
- CI/CD pipelines
- Development and testing
View v1 API Documentation →
Enterprise API v2 (Enterprise Admin Only)
The v2 API provides enterprise-wide management and analytics capabilities.
Base URL: https://api.devin.ai/v2/enterprise/*
Authentication: Enterprise Admin Personal API Keys only
Key Features:
- Enterprise-wide session analytics and insights
- Organization and member management
- Consumption tracking and billing data
- Audit logs and compliance reporting
- Git permissions management
- Repository indexing
Best for:
- Enterprise administrators
- Analytics and reporting
- Compliance and audit
- Organization management
View v2 API Documentation →
Service User API v3 (RBAC)
The v3 API provides full RBAC support with service user authentication.
Base URLs:
https://api.devin.ai/v3beta1/enterprise/*
https://api.devin.ai/v3beta1/organizations/*
Authentication: Service User Credentials (Enterprise or Organization level)
Key Features:
- Full role-based access control (RBAC)
- Service users with dedicated roles
- Fine-grained permissions
- Multi-organization workflows
- Clear separation between human and service accounts
Best for:
- Production automation with specific permissions
- Multi-organization integrations
- Compliance-sensitive workflows
- Long-lived service integrations
View v3 API Documentation →
Quick Start
Get an API Key
- For v1 API: Generate an API key from Settings > API Keys in any sub-organization
- For v2 API: Generate a personal API key from Settings > API Keys in any sub-organization
- For v3 API: Create a service user from Enterprise Settings > Service Users
Keep your API keys secure and never share them in publicly accessible areas such as GitHub repositories or client-side code.
Make Your First Request
Include your API key in the Authorization header:
Authorization: Bearer your_api_key_here
Example - Create a v1 session:
curl -X POST "https://api.devin.ai/v1/sessions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Create a simple Python script that prints Hello World"
}'
Error Handling
All APIs use standard HTTP status codes:
200 OK: Successful request
201 Created: Resource created successfully
400 Bad Request: Invalid request parameters
401 Unauthorized: Missing or invalid API key
403 Forbidden: Insufficient permissions
404 Not Found: Resource not found
429 Too Many Requests: Rate limit exceeded
500 Internal Server Error: Server error
Support
For questions about the API or to report issues, email [email protected].