Skip to content

Create Webhook​

POST
/webhooks

Creates a webhook for one or more event types and an HTTPS target URL. The response contains the safe configuration; the shared secret is not returned.

Use cases

  • Send charger and charging-session events to an integration you operate.
  • Configure a receiver to validate deliveries and deduplicate retries.

Each delivery is an HTTP POST with a JSON body shaped as { eventType, data }. Headers include x-cleverev-webhook-secret (the configured secret, sent as-is rather than as an HMAC signature), x-cleverev-webhook-timestamp (an ISO 8601 timestamp), and x-cleverev-idempotency-key (stable across retries for the same event and destination). Network errors, HTTP 429, and 5xx responses are retried up to 10 times with exponential backoff starting at one minute; other non-2xx responses are not retried.

Example body (abbreviated):

{
  "eventType": "session_stopped",
  "data": { "session": { "id": "3ABCDEFGHJKLMNPQRSTU", "status": { "status": "completed" } } }
}

Related endpoints

  • GET /webhooks — list configured webhooks.
  • GET /webhooks/{webhookId} — inspect a webhook.
  • PATCH /webhooks/{webhookId} — change its URL, secret, or event types.

Authorizations​

bearerAuth

Generate an API token here

Type
HTTP (bearer)

Parameters​

Header Parameters

compatibility-date*

API compatibility date in YYYY-MM-DD format. Must be a date after 2025-11-01.

Type
string
Required
Example"2025-11-02"
Pattern
^\d{4}-\d{2}-\d{2}$
organization-id*

Routes the request to the organization named by this ID. The bearer token must be authorized for that organization.

Type
string
Required
Example"3b241101-e2bb-4255-8caf-4136c566a962"
Min Length
1
Max Length
40

Request Body​

application/json

HTTPS endpoint that receives event deliveries.

Max Length256
Format"uri"

Generate a random secret, store it securely, and compare it with the x-cleverev-webhook-secret header on each delivery.

Min Length8
Max Length40

Select one or more event types; duplicate values are rejected.

Min Items1

Responses​

success.webhook.create

application/json

Playground​

Authorization
Headers
Body

Samples​