API Reference

v1.4 · stable

The HTTP API is organized around REST. It uses predictable resource-oriented URLs, JSON-encoded responses, and standard HTTP response codes. All endpoints are versioned and backward-compatible within a major version.

Base URL
https://api.example.com/v1
Authentication

All requests must include a bearer token in the Authorization header. Tokens can be issued through the dashboard and are scoped per environment (live/test).

# request curl "https://api.example.com/v1/users/me" \ -H "Authorization: Bearer sk_live_a8f4c2c9d1e0" # 200 OK { "id": "usr_a8f4c2", "email": "[email protected]", "plan": "team", "created_at": 1721834400 }
Note: Test-mode tokens (prefix sk_test_) never touch production data and are rate-limited separately.
Endpoints
GET/v1/users/{id}Retrieve a user
POST/v1/usersCreate a user
GET/v1/ordersList orders (paginated)
POST/v1/ordersCreate an order
GET/v1/orders/{id}Retrieve an order
PUT/v1/orders/{id}Update an order
GET/v1/productsList products
DEL/v1/webhooks/{id}Delete a webhook
Rate limits
Global limit1000 requests / hour per API key
Burst60 requests / minute
Response headerX-RateLimit-Remaining
On limit exceeded429 with Retry-After header
Errors

The API returns conventional HTTP status codes. All error responses share the same JSON shape:

{ "error": { "code": "resource_not_found", "message": "No user with id usr_00000", "request_id": "req_01HN7Z9AE" } }