Getting Started

Capacitor is a headless OCPP 1.6J backend with a REST API. Connect EV chargers, manage charging sessions, and receive real-time events — all through a simple API.

Base URL

Production
text
https://api.capacitor.live/api/v1

Create an API key

Everything in the dashboard works without one. To call the API from your own code, open API Keys in the dashboard (after verifying your email) and create a key. It's shown once, so store it safely. Send it in the X-API-Key header. See Authentication.

Get a charger online

No hardware yet: start a virtual charger

A virtual charger runs on Capacitor and speaks real OCPP 1.6J. It's free on every plan and doesn't count towards your charger limit. In the dashboard, click Add virtual charger, or:

Create a virtual charger
bash
curl -X POST https://api.capacitor.live/api/v1/chargers/virtual \
  -H "X-API-Key: cap_live_..."

It's online within seconds. Details in Virtual Charger.

A real charger: register it, then point it at Capacitor

Register the charger's ID first (connections from unregistered IDs are refused), in the dashboard with Add Charger, or:

Register a charger
bash
curl -X POST https://api.capacitor.live/api/v1/chargers \
  -H "X-API-Key: cap_live_..." \
  -H "Content-Type: application/json" \
  -d '{"chargeBoxId": "CHARGER-001", "name": "Office Parking Lot"}'

Then, in the charger's OCPP settings, enter:

Charger OCPP settings
text
Central System URL: wss://api.capacitor.live/ocpp/
Charge Point ID: CHARGER-001
OCPP version: 1.6J (JSON), secure wss:// (TLS 1.2+)
Most chargers add the Charge Point ID to the URL themselves, so enter the URL and the ID separately. Only if your charger has a single URL field and nowhere to enter an ID, use the full URL wss://api.capacitor.live/ocpp/CHARGER-001. The charger page in the dashboard shows live connection attempts and what to fix if it doesn't connect.

Start a charging session

Plug a vehicle in (on a virtual charger: Plug in vehicle, or the plug action). When the connector is Preparing, start the session. Any idTag (letters and numbers) works on every plan.

Remote start
bash
curl -X POST https://api.capacitor.live/api/v1/transactions/start \
  -H "X-API-Key: cap_live_..." \
  -H "Content-Type: application/json" \
  -d '{"chargeBoxId": "CHARGER-001", "connectorId": 1, "idTag": "USER001"}'
202 Accepted means the charger accepted the request; the session starts a moment later. Confirm it with the transaction.started webhook or GET /transactions?status=in_progress.