Skip to navigation

Introduction

Explore the EV Cloud API reference, with code samples for every endpoint.

Installation

You can call the API over HTTP from any language, or use the official TypeScript and Python SDKs or the CLI.

To install the TypeScript SDK, run the following command in your Node.js project:

npm i evcloud-sdk

To install the Python SDK:

pip install evcloud-sdk

To install the CLI:

npm i -g @evcloud/cli

Base URL

The production API is https://api.ev-cloud.ai, and the paths in this reference are relative to it. Pass it, or another EV Cloud host, as environment (TypeScript), base_url (Python) or --base-url / EVCLOUD_CLI_BASE_URL (CLI).

Authentication

Every request carries a bearer token that expires:

Authorization: Bearer <token>
import { EvcloudSDK } from "evcloud-sdk";
const client = new EvcloudSDK({
environment: "https://api.ev-cloud.ai",
token: process.env.EVCLOUD_TOKEN!,
});

Every result is scoped to the token’s organization. See Authentication for SDK tokens and browser sign-in.

Domains

DomainSDK namespaceREST prefix
CPOclient.cpo/cpo
eMSPclient.emsp/emsp
Energyclient.energy/energy-management
Webhooksclient.webhooks/webhook-gateway
OCPIclient.ocpi/ocpi

Errors and retries

A 4xx or 5xx response raises an error with the status code and the response body. The SDKs retry 408, 429 and 5xx responses up to 2 times, but send a POST that could act twice only once. See Errors and retries.