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

# API overview

> Automate ChargerDojo with an API key: partner endpoints, conformance runs, charging journeys, and the graded reports and usage they produce.

ChargerDojo has one public API. It is the HTTP surface you automate with an
**API key** against the deployed service:

```text theme={null}
https://chargerdojo.com
```

All operations live under `/api/v1` and authenticate with a Bearer API key that starts
with `cdojo_`. There is no other supported base URL and no environment selector.

```bash theme={null}
curl -fsS "https://chargerdojo.com/api/v1/connections" \
  -H "Authorization: Bearer $DOJO_KEY"
```

## What you can automate

| Area              | Operations                                                                                                                     |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Connections       | Create a partner endpoint, register it (the live OCPI credentials handshake), list and read your endpoints.                    |
| Suites            | List the conformance suites available to run.                                                                                  |
| Conformance runs  | Start a run, wait for or poll it, list runs, read the full report, delete a run, mint a share link.                            |
| Manual command    | Send one bounded OCPI request through a registered connection and get the exact exchange back.                                 |
| Charging journeys | Browse the catalogue, preview a plan, start a run idempotently, stream its events, cancel it, and resolve a recovery decision. |
| Usage             | Read your plan tier, current usage and ceilings.                                                                               |

Only the operations in the API reference section of this site are public API. Everything
else the application does (the interactive simulator, entity editing, account and
key management) is browser functionality, not part of this contract.

## Authentication

Every request sends the key in the `Authorization` header:

```text theme={null}
Authorization: Bearer $DOJO_KEY
```

API keys are created and revoked in the app, in **Settings, then Security**, and require
a paid plan. There is no API for managing keys: a key cannot mint, list or revoke other
keys. See [Create an API key](/guide/create-an-api-key).

## Response envelope

Every response is JSON, except the journey event stream, which is `text/event-stream`.
Successes wrap their payload:

```json theme={null}
{ "success": true, "data": {} }
```

Errors carry an HTTP 4xx or 5xx status and a message:

```json theme={null}
{ "success": false, "message": "Report not found" }
```

Two statuses deserve a special mention because CI scripts get them wrong:

* A `202` means the work was accepted and is **still going**. It is not a success verdict
  and not a failure. Poll or wait for the result instead of gating on it.
* A `503` on a charging journey start means **our runner is unavailable**. It is a statement
  about our service, never a verdict about your partner's implementation.

The full status-code table is in [Troubleshooting](/guide/troubleshooting).

## Limits and usage

Plans set ceilings on runs per minute and in flight, and on the connections every self-serve
tier buys. Report retention
differs between free and paid. The active-key cap is the same for every account. Read your own
numbers instead of hardcoding them:

```bash theme={null}
curl -fsS "https://chargerdojo.com/api/v1/usage" \
  -H "Authorization: Bearer $DOJO_KEY" | jq '.data'
```

The response reports your tier, active connections against their cap, active keys against
their cap, in-flight and per-minute run ceilings, and your report retention window.
`connections.cap` comes back `null` on a plan priced on a quote, where connections are fair use
rather than a rung you are sold. Read that absence as no published ceiling, never as zero.
A run over its rate or in-flight ceiling returns `429` with a `Retry-After` header. A resource cap
never does, because waiting will not help. The connection cap answers `402` where your plan
publishes a rung, carrying `limit` with what you hold and what the plan allows, so free a slot or
move up. The active-key cap answers `409`, and so does the connection cap on a plan priced on a
quote, where there is no rung to move to. An
in-flight charging journey holds one run slot until it reaches a terminal state, and a
run waiting on a recovery decision keeps holding its slot until you decide.

## Where to go next

<CardGroup cols={2}>
  <Card title="Create an API key" icon="key" href="/guide/create-an-api-key">
    Sign in, create the key in Settings, store it once.
  </Card>

  <Card title="Quickstart" icon="play" href="/guide/quickstart">
    A complete conformance run from the command line.
  </Card>

  <Card title="Connect a partner" icon="plug" href="/guide/connect-a-partner">
    Register a real partner endpoint and run against it.
  </Card>

  <Card title="Run a charging journey" icon="route" href="/guide/run-a-charging-journey">
    Drive a full charging story and watch it live.
  </Card>
</CardGroup>
