View all connectors

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 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 for either an enterprise or an organization.

Enterprise-scoped connection

An enterprise API key with the following permissions:

  • ManageAccountMembership — to list enterprise members
  • ManageBilling — 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
  • ManageBilling — to access organization consumption data
  • ViewAccountMetrics — 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
/v3/enterprise/consumption/daily/ Link
/v3/enterprise/metrics/prs Link

Organization-scoped endpoints

Endpoint Documentation
/v3/self Link
/v3beta1/organizations/{orgId}/members/users Link
/v3/organizations/{orgId}/consumption/daily/users/ Link
/v3/organizations/{orgId}/metrics/prs Link

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: ManageAccountMembership, ManageBilling, 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.