Skip to main content
The base URL is https://api.relay.example/v1. Requests and responses are JSON. Authenticate with a bearer token; see Authentication.

Endpoints

Send an event

string
required
The event type, such as invoice.paid. Lowercase letters, digits, dots and underscores.
object
required
The payload, up to 256 KB. Relay delivers it unchanged.
string
Up to 255 characters. See Idempotency.

Errors

Errors answer with a status code and a body like {"error": {"type": "rate_limited", "message": "..."}}.
Decision diagram for a failed request: retry with the same Idempotency-Key on 5xx api_error, a timeout or a network error; wait, then retry with the same key on 429 rate_limited (wait Retry-After seconds) and 409 request_in_progress (wait a second); fix first on 409 idempotency_conflict, 400 invalid_request, 401 authentication_failed, 403 permission_denied and 404 not_found.

Retry server errors and rate limits with the same idempotency key; fix the request, the key or the scope for everything else.