# CircleCI

> Connect a CircleCI personal API token and your contracted credit price to LevelFour.

Source: https://docs.levelfour.ai/connectors/circleci


> **Warning**
>
> CircleCI bills in credits, not currency. This connector estimates dollars by multiplying credit usage by the price you enter. It will not reflect anything your contract prices differently.

## Prerequisites

* A CircleCI organization.
* An Org Admin, to create the personal API token. CircleCI has no scoped, billing-only token.
* Your contracted price per credit, in USD.

## Connect

### Create a personal API token in CircleCI

As an Org Admin, go to **User Settings > Personal API Tokens** and create a token. Copy it, along with your Organization ID from **Organization Settings > Overview**.

> **Warning**
>
> This token is tied to the person who created it and carries their full access. Use a dedicated Org Admin identity, since the token breaks if that person leaves the organization.

### Add it to LevelFour

Open **Connect Providers**, select **CircleCI**, and paste the token, the Organization ID, and your price per credit. Click **Add Personal API token**.

## Confirming it worked

The connection moves to **Connected**, with first data typically landing 3 to 6 hours after you connect. Your first data appears within a day.

## Rotating or removing access

### Rotating the credential

Create a new personal API token in CircleCI, paste it into **Connect Providers**, then revoke the old token from **User Settings > Personal API Tokens**.

### Removing access

Disconnect CircleCI under **Connect Providers**, then revoke the token from CircleCI.

## Troubleshooting

| Symptom                           | What to do                                                                                                                                             |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Spend does not match your invoice | This is an estimate: credits times the price you entered. Compare against CircleCI's own Plans UI, which is the billing source of truth                |
| The token stops working           | Personal tokens belong to one person and are revoked if that person is removed from the organization. Recreate it under a dedicated Org Admin identity |
| Backfill is slow to complete      | CircleCI limits usage report requests to 10 per hour per organization, so a full 12-month backfill takes time. It completes in the background          |

## Next

* [Connect Providers](/connectors) lists every provider you can connect
