---
title: "Devin"
canonical_url: "https://docs.getdx.com/connectors/devin/"
md_url: "https://docs.getdx.com/connectors/devin.md"
last_updated: "2026-11-13"
---

# Devin
By enabling the Devin connector, you can import daily metrics for user consumption and pull request activity. Please refer to the API documentation below and our [schema explorer](https://docs.getdx.com/schema/) to see what data DX imports.

DX supports both **enterprise-scoped** and **organization-scoped** Devin connections. Choose the scope that matches your Devin account tier and the API key you provision.

## Prerequisites

To connect Devin to DX, you will need a [Devin API key](https://docs.devin.ai/api-reference/overview) for either an enterprise or an organization.

### Enterprise-scoped connection

An enterprise API key with the following permissions:

- **ViewAccountMembership** — to list enterprise members
- **ViewAccountConsumption** — to access consumption data
- **ViewAccountMetrics** — to access PR and usage metrics

### Organization-scoped connection

An organization service-user API key (prefixed with `cog_`) with the following permissions:

- **ReadAccountMeta** — to discover the organization ID via `/v3/self`
- **ViewOrgMembership** — to list organization members
- **ViewOrgConsumption** — to access organization consumption data
- **ViewOrgMetrics** — to access organization PR and usage metrics

DX discovers the organization ID automatically by calling `/v3/self` with the provided key, so the key must be scoped to a single organization.

## Setup instructions

Follow the steps below to connect Devin to DX.

#### Step 1

Navigate to the Devin admin settings page to obtain your API key. Ensure your API key has the required permissions listed above for DX to fetch data successfully.

#### Step 2

- Navigate to the connections page in DX and select "+ Connection" in the top right.
- Enter the credentials you have generated in the previous steps—refer to the information below for errors and troubleshooting.

## API reference

The table below lists the specific API endpoints that are used by DX.

### Enterprise-scoped endpoints


| Endpoint | Documentation |
|--------------------------------------------------|---------------|
| /v3/enterprise/members | [Link](https://docs.devin.ai/api-reference/v3/users/members-users) |
| /v3/enterprise/consumption/daily/{userId} | [Link](https://docs.devin.ai/api-reference/v3/consumption/consumption-daily-users) |
| /v3/enterprise/metrics/prs | [Link](https://docs.devin.ai/api-reference/v3/metrics/metrics-prs) |


### Organization-scoped endpoints


| Endpoint | Documentation |
|--------------------------------------------------|---------------|
| /v3/self | [Link](https://docs.devin.ai/api-reference/v3/self/self) |
| /v3beta1/organizations/{orgId}/members/users | [Link](https://docs.devin.ai/api-reference/v3/users/list-organization-users) |
| /v3/organizations/{orgId}/consumption/daily/users/{userId} | [Link](https://docs.devin.ai/api-reference/v3/consumption/organizations-consumption-daily-users) |
| /v3/organizations/{orgId}/metrics/prs | [Link](https://docs.devin.ai/api-reference/v3/metrics/organizations-metrics-prs) |


## Errors

The table below lists potential error codes when adding a connection in DX.


| Error | Description |
|------------------------|--------------------------------------------------------------------------|
| `invalid_credentials` | Your API credentials entered are not valid. |
| `invalid_permissions` | Your API key does not have the required permissions. For enterprise keys: ViewAccountMembership, ViewAccountConsumption, ViewAccountMetrics. For organization keys: the key must return an `org_id` from `/v3/self` and be authorized to read organization members, consumption, and PR metrics. |
| `unauthorized` or `forbidden` | Your API key is missing at least one required permission for the selected scope (enterprise or organization). |
| `no_resources` | DX cannot access any enterprise or organization members with the provided key. |
---

## Sitemap

[Overview of all docs pages](/llms.txt)
