The v3 API is currently in beta. Some endpoints may change as we improve the API.
https://api.devin.ai/v3beta1/enterprise/*– endpoints that require enterprise-level permissionshttps://api.devin.ai/v3beta1/organizations/*– endpoints scoped to a single organization
Some enterprise endpoints operate on specific organizations but are still guarded by
enterprise-level permissions. These use paths like
/v3beta1/enterprise/organizations/{org_id}/...
(for example, GET /v3beta1/enterprise/organizations/{org_id}/audit-logs).
Even though they include an org_id path parameter, they still require
enterprise-level permissions such as ManageEnterpriseSettings.Permissions and RBAC
Every v3 endpoint is gated by a specific permission assigned to the calling service user’s role. Permissions are split into two scopes: enterprise-level permissions control/v3beta1/enterprise/* endpoints, and organization-level permissions control /v3beta1/organizations/{org_id}/* endpoints. An enterprise service user with an enterprise-level permission automatically inherits the corresponding org-level permission across all organizations.
Enterprise permissions
| Permission | Controls |
|---|---|
ReadAccountMeta | Self (granted to all service users by default) |
ManageEnterpriseSettings | Audit logs, Organization tags |
ManageOrganizations | Organizations CRUD, Organization group limits |
ManageAccountMembership | Roles, Enterprise users, Enterprise IdP groups, Enterprise service user membership, Enterprise IdP group registration |
ManageAccountServiceUsers | Service user provisioning (enterprise) |
ManageAccountKnowledge | Knowledge notes (enterprise) |
ManageAccountPlaybooks | Playbooks (enterprise) |
ManageGitIntegrations | Git connections, Git permissions |
ManageBilling | Consumption cycles, Daily consumption breakdowns |
ViewAccountMetrics | Usage metrics (DAU/WAU/MAU, PRs, sessions, searches, active users), Queue status |
ViewEnterpriseInfraDetails | Hypervisors |
ViewAccountSessions | Sessions list and detail (enterprise, read-only) |
ManageAccountSessions | Send messages to sessions (enterprise) |
ViewAccountSearches | Searches (enterprise) |
Organization permissions
| Permission | Controls |
|---|---|
ManageOrgSecrets | Secrets CRUD |
ManageOrgKnowledge | Knowledge notes (organization) |
ManageOrgPlaybooks | Playbooks (organization) |
ManageOrgServiceUsers | Service user provisioning (organization) |
ViewOrgSessions | Sessions list and detail (organization, read-only) |
ManageOrgSessions | Send messages, terminate, archive sessions |
UseDevinSessions | Create sessions |
ImpersonateOrgSessions | Create sessions on behalf of other users (create_as_user_id) |
ViewOrgSearches | Searches (organization) |
Service user scopes
Enterprise service users authenticate with/v3beta1/enterprise/* endpoints and can operate across all organizations. They are assigned enterprise-level roles and automatically inherit the corresponding org-level permissions in every organization (for example, ViewAccountSessions grants ViewOrgSessions in all orgs).
Organization service users are scoped to a single organization and authenticate with /v3beta1/organizations/{org_id}/* endpoints only. They are assigned org-level roles.
Creating service users
Service users can be created in two ways:- UI: Enterprise Settings → Service Users — create enterprise or org-level service users with custom roles and generate API tokens.
- API:
POST /v3beta1/enterprise/service-usersorPOST /v3beta1/organizations/{org_id}/service-users— programmatically provision service users with a specified role and TTL. The new user’s permissions must be a subset of the caller’s permissions (privilege escalation is prevented).
Self
Get information about the authenticated service user:Audit Logs
Access comprehensive audit trails:Enterprise Audit Logs
Get enterprise-wide audit logs
Organization Audit Logs
Get audit logs for a specific organization
Consumption
Track detailed consumption metrics:Consumption Cycles
View consumption cycle summaries
Daily Consumption
Get daily consumption breakdowns
By Organization
Track consumption by organization
By User
Track consumption by user
By Session
Track consumption by session
Organizations
Manage organizations with full RBAC:List Organizations
View all organizations
Create Organization
Create a new organization
Update Organization
Update organization settings
Delete Organization
Delete an organization
Service Users
Manage service users at enterprise and organization levels:List Enterprise Service Users
View enterprise service users
Create Enterprise Service User
Create an enterprise service user
Update Enterprise Service User
Update an enterprise service user
Delete Enterprise Service User
Delete an enterprise service user
List Org Service Users
View organization service users
Create Org Service User
Create an organization service user
Users
Manage users at enterprise and organization levels:List Enterprise Users
View enterprise users
Add Enterprise User
Add a user to the enterprise
Update Enterprise User
Update an enterprise user
Remove Enterprise User
Remove a user from the enterprise
List Org Users
View organization users
Add Org User
Add a user to an organization
IDP Groups
Manage IdP groups at enterprise and organization levels:List Registered Enterprise Groups
List IDP groups registered with this enterprise
Register Enterprise Groups
Register IDP groups for this enterprise
Remove Registered Enterprise Group
Remove a registered IDP group from this enterprise
List Enterprise Groups
View enterprise IdP group assignments
Assign Enterprise Group
Assign an IdP group role at the enterprise level
List Org Groups
View organization IdP group assignments
Assign Org Group
Assign an IdP group role at the organization level
Git Permissions
Manage repository access:List Permissions
View git permissions for an organization
Add Permission
Add a git permission
Remove Permission
Remove a git permission
Notes
Manage knowledge notes at enterprise and organization levels:List Enterprise Notes
View enterprise knowledge notes
Create Enterprise Note
Create a new enterprise note
List Org Notes
View organization knowledge notes
Create Org Note
Create a new organization note
Playbooks
Manage playbooks at enterprise and organization levels:List Enterprise Playbooks
View enterprise playbooks
Create Enterprise Playbook
Create a new enterprise playbook
List Org Playbooks
View organization playbooks
Create Org Playbook
Create a new organization playbook
Sessions
Manage organization sessions:List Sessions
View sessions for an organization
Create Session
Create a new session
Terminate Session
Terminate an active session
Archive Session
Archive a session for future reference
Tags
Manage organization tags (requires session tags feature):Get Tags
View tags for an organization
Add Tags
Append tags to an organization
Replace Tags
Replace all tags for an organization
Delete Tag
Remove a specific tag
Roles & Metrics
List Roles
View available roles
Usage Metrics
Get enterprise usage metrics
Org Metrics
Get organization usage metrics
Usage Examples
View Code Examples
Check out code examples and common use cases for the v3 API
