---
title: "Augment Code"
canonical_url: "https://docs.getdx.com/connectors/augment-code/"
md_url: "https://docs.getdx.com/connectors/augment-code.md"
last_updated: "2026-08-27"
---

# Augment Code
By integrating Augment Code with DX, you can import daily user activity and model-level credit consumption, link Augment Code users to DX users, and analyze adoption alongside your other AI tools. DX does not read or access your source code.

## Prerequisites

To connect Augment Code to DX, you need:

- an Augment Code Enterprise organization; the Analytics API is currently a preview feature available only to Enterprise customers
- permission to create a service account and API token for your Augment Code organization

## Setup instructions

Follow the steps below to connect Augment Code to DX.

#### Step 1

Create an Augment Code service account:

1. Open your organization's [Service Accounts](https://app.augmentcode.com/settings/service-accounts) page.
1. Select **Add Service Account**.
1. Enter a unique service name, such as `dx-integration`, and optionally add a description.
1. Select **Create**.

#### Step 2

Generate an API token:

1. Find the new service account in the service accounts list.
1. Select **Create Token**.
1. Enter a description, such as `DX Analytics API integration`.
1. Select **Create**, then copy and securely store the token. Augment Code shows the token only once.

#### Step 3

1. In DX, navigate to **Settings > Data connectors** and select **Add connector**.
1. Select **Augment Code** as the connector type.
1. Enter the API token generated in Step 2.
1. Select **Add connection**. DX verifies access to both user activity and model credit usage before completing setup.

## API reference

DX sends requests to `https://api.augmentcode.com` and authenticates with the API token as a Bearer token.


| Endpoint | Documentation |
|----------|---------------|
| GET /analytics/v0/user-activity | [Link](https://docs.augmentcode.com/analytics/api-reference#get-/analytics/v0/user-activity) |
| GET /analytics/v0/credit-usage-by-user | [Link](https://docs.augmentcode.com/analytics/api-reference#get-/analytics/v0/credit-usage-by-user) |


## Errors

The table below lists potential error codes when adding an Augment Code connection in DX.


| Error | Description |
|-------|-------------|
| `invalid_credentials` | The API token is invalid, expired, or revoked. |
| `invalid_permissions` | The service account cannot access the Analytics API, or the organization does not have Enterprise Analytics API access. |
| `no_resources` | Augment Code returned an unexpected response while DX verified access to activity or credit data. An empty but valid response is accepted because your organization might not have recent activity. |
---

## Sitemap

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