> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devinenterprise.com/llms.txt
> Use this file to discover all available pages before exploring further.

# v2 API Overview (Legacy)

> Enterprise-wide management, analytics, and compliance for administrators

> [!WARNING]
>
> This API version is deprecated. Use [API v3](https://docs.devinenterprise.com/api-reference/v3/overview.md) with service user authentication. See the [migration guide](https://docs.devinenterprise.com/api-reference/getting-started/migration-guide.md) for step-by-step instructions.

The v2 API provides enterprise-wide management, analytics, and compliance capabilities for enterprise administrators.

> [!NOTE]
>
> Access to the v2 API requires Enterprise Admin role.

**Base URL:** `https://api.devin.ai/v2/enterprise/*`

**Authentication:** Enterprise Admin Personal API Keys ([learn more](https://docs.devinenterprise.com/api-reference/authentication.md))

## Permissions

The v2 API requires the **Enterprise Admin** role. Only users with this role can generate personal API keys that work with v2 endpoints. Service API keys and organization-level keys are not accepted.

All v2 endpoints provide enterprise-wide access to resources across all organizations within the enterprise. For organization-scoped access or fine-grained RBAC control, use the [Organization API](https://docs.devinenterprise.com/api-reference/v3/overview.md) or [Enterprise API](https://docs.devinenterprise.com/api-reference/v3/overview.md) respectively.

## API Keys

Provision and manage service API keys for your enterprise:

> [card] [Provision Service Key](https://docs.devinenterprise.com/api-reference/v2/api-keys/provision-service-key.md)
>
> Create a new service API key for automation

> [card] [List API Keys](https://docs.devinenterprise.com/api-reference/v2/api-keys/list-enterprise-api-keys.md)
>
> View all API keys in your enterprise

> [card] [Revoke API Key](https://docs.devinenterprise.com/api-reference/v2/api-keys/revoke-enterprise-api-key.md)
>
> Revoke a specific API key

## Audit Logs

Access compliance and security audit trails:

> [card] [Get Audit Logs](https://docs.devinenterprise.com/api-reference/v2/audit-logs.md)
>
> Retrieve enterprise-wide audit logs for compliance

## Consumption

Track ACU usage and billing. Available only to accounts on the **Enterprise** plan:

> [card] [Consumption Cycles](https://docs.devinenterprise.com/api-reference/v2/consumption/consumption-cycles.md)
>
> View consumption cycle summaries

> [card] [Daily Consumption](https://docs.devinenterprise.com/api-reference/v2/consumption/daily-consumption.md)
>
> Get daily consumption breakdowns

> [card] [User Daily Consumption](https://docs.devinenterprise.com/api-reference/v2/consumption/user-daily-consumption.md)
>
> Track consumption by user

## Groups

Manage enterprise IdP groups:

> [card] [List Groups](https://docs.devinenterprise.com/api-reference/v2/groups/list-enterprise-groups.md)
>
> View all IdP groups in your enterprise

> [card] [Get Group Details](https://docs.devinenterprise.com/api-reference/v2/groups/get-group-details.md)
>
> Retrieve details for a specific group

## Members

Manage enterprise members and roles:

> [card] [List Members](https://docs.devinenterprise.com/api-reference/v2/members/list-enterprise-members.md)
>
> View all members in your enterprise

> [card] [Get Member Details](https://docs.devinenterprise.com/api-reference/v2/members/get-member-details.md)
>
> Retrieve details for a specific member

> [card] [Invite Members](https://docs.devinenterprise.com/api-reference/v2/members/invite-enterprise-members.md)
>
> Invite new members to your enterprise

> [card] [Delete Member](https://docs.devinenterprise.com/api-reference/v2/members/delete-enterprise-member.md)
>
> Remove a member from your enterprise

> [card] [List Roles](https://docs.devinenterprise.com/api-reference/v2/members/list-roles.md)
>
> View available roles

## Metrics

Access analytics and usage metrics:

> [card] [PR Metrics](https://docs.devinenterprise.com/api-reference/v2/consumption/pr-metrics.md)
>
> View pull request metrics

> [card] [Session Metrics](https://docs.devinenterprise.com/api-reference/v2/consumption/sessions-metrics.md)
>
> Access session analytics

> [card] [Search Metrics](https://docs.devinenterprise.com/api-reference/v2/consumption/searches-metrics.md)
>
> View search usage metrics

> [card] [Usage Metrics](https://docs.devinenterprise.com/api-reference/v2/consumption/usage-metrics.md)
>
> Get overall usage analytics

## Organizations

Manage sub-organizations:

> [card] [List Organizations](https://docs.devinenterprise.com/api-reference/v2/organizations/list-organizations.md)
>
> View all organizations in your enterprise

> [card] [Create Organization](https://docs.devinenterprise.com/api-reference/v2/organizations/create-organization.md)
>
> Create a new sub-organization

> [card] [Get Organization](https://docs.devinenterprise.com/api-reference/v2/organizations/get-organization-details.md)
>
> Retrieve organization details

> [card] [Update Organization](https://docs.devinenterprise.com/api-reference/v2/organizations/update-organization.md)
>
> Update organization settings

> [card] [Delete Organization](https://docs.devinenterprise.com/api-reference/v2/organizations/delete-organization.md)
>
> Delete a sub-organization

## Sessions

View enterprise-wide session data:

> [card] [List Sessions](https://docs.devinenterprise.com/api-reference/v2/sessions/list-enterprise-sessions.md)
>
> View all sessions across the enterprise

> [card] [Session Insights](https://docs.devinenterprise.com/api-reference/v2/sessions/list-enterprise-sessions-insights.md)
>
> Get AI-powered session insights

> [card] [Get Session](https://docs.devinenterprise.com/api-reference/v2/sessions/get-enterprise-session.md)
>
> Retrieve details for a specific session

## Playbooks

Manage enterprise-wide playbooks:

> [card] [List Playbooks](https://docs.devinenterprise.com/api-reference/v2/playbooks/list-playbooks.md)
>
> View all playbooks

> [card] [Create Playbook](https://docs.devinenterprise.com/api-reference/v2/playbooks/create-playbook.md)
>
> Create a new playbook

## Next steps

Migrate to the [current API](https://docs.devinenterprise.com/api-reference/overview.md) for RBAC with service users, session attribution, and new features. See the [migration guide](https://docs.devinenterprise.com/api-reference/getting-started/migration-guide.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.