Skip to main content
The v3 API provides full RBAC support with service user authentication. This is the recommended API for production automation.
The v3 API is currently in beta. Some endpoints may change as we improve the API.
Base URLs:
  • https://api.devin.ai/v3beta1/enterprise/* – endpoints that require enterprise-level permissions
  • https://api.devin.ai/v3beta1/organizations/* – endpoints scoped to a single organization
Authentication: Service User Credentials (Enterprise or Organization level) (learn more)
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

PermissionControls
ReadAccountMetaSelf (granted to all service users by default)
ManageEnterpriseSettingsAudit logs, Organization tags
ManageOrganizationsOrganizations CRUD, Organization group limits
ManageAccountMembershipRoles, Enterprise users, Enterprise IdP groups, Enterprise service user membership, Enterprise IdP group registration
ManageAccountServiceUsersService user provisioning (enterprise)
ManageAccountKnowledgeKnowledge notes (enterprise)
ManageAccountPlaybooksPlaybooks (enterprise)
ManageGitIntegrationsGit connections, Git permissions
ManageBillingConsumption cycles, Daily consumption breakdowns
ViewAccountMetricsUsage metrics (DAU/WAU/MAU, PRs, sessions, searches, active users), Queue status
ViewEnterpriseInfraDetailsHypervisors
ViewAccountSessionsSessions list and detail (enterprise, read-only)
ManageAccountSessionsSend messages to sessions (enterprise)
ViewAccountSearchesSearches (enterprise)

Organization permissions

PermissionControls
ManageOrgSecretsSecrets CRUD
ManageOrgKnowledgeKnowledge notes (organization)
ManageOrgPlaybooksPlaybooks (organization)
ManageOrgServiceUsersService user provisioning (organization)
ViewOrgSessionsSessions list and detail (organization, read-only)
ManageOrgSessionsSend messages, terminate, archive sessions
UseDevinSessionsCreate sessions
ImpersonateOrgSessionsCreate sessions on behalf of other users (create_as_user_id)
ViewOrgSearchesSearches (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:
  1. UI: Enterprise Settings → Service Users — create enterprise or org-level service users with custom roles and generate API tokens.
  2. API: POST /v3beta1/enterprise/service-users or POST /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).
For token generation and authentication details, see the Authentication Guide.

Self

Get information about the authenticated service user:

Audit Logs

Access comprehensive audit trails:

Consumption

Track detailed consumption metrics:

Organizations

Manage organizations with full RBAC:

Service Users

Manage service users at enterprise and organization levels:

Users

Manage users at enterprise and organization levels:

IDP Groups

Manage IdP groups at enterprise and organization levels:

Git Permissions

Manage repository access:

Notes

Manage knowledge notes at enterprise and organization levels:

Playbooks

Manage playbooks at enterprise and organization levels:

Sessions

Manage organization sessions:

Tags

Manage organization tags (requires session tags feature):

Roles & Metrics

Usage Examples

View Code Examples

Check out code examples and common use cases for the v3 API