REST API
Read prices, push approvals, and manage products over HTTP.
The Elastly REST API lets you read recommendations and prices, approve changes, and manage products programmatically — the same operations the dashboard performs. Every recommendation is explainable: the factors that drove it travel with the response.
All requests require a Bearer token. See Authentication.
Authentication
Elastly authenticates every request with a secret API key sent as a bearer token. Keys are scoped per workspace and come in two flavours: pw_live_ for production and pw_test_ for the sandbox. Generate and rotate keys under Settings → API keys.
Authorization: Bearer pw_live_8fK2…Never expose a pw_live_ key in client-side code. Treat it like a password.
Errors
Elastly uses conventional HTTP status codes — 2xx is success, 4xx a problem with your request, 5xx a rare error on our side. Every error body includes a machine-readable code and a human message.
| Status | Code | Meaning |
|---|---|---|
| 400 | bad_request | The request was malformed or missing a field. |
| 401 | unauthorized | Missing or invalid API key. |
| 422 | guardrail_violation | Price falls outside the SKU's floor or ceiling. |
| 429 | rate_limited | Too many requests — slow down and retry. |
| 5xx | server_error | Something went wrong on our end. Retry with backoff. |
Retrieve a price
Returns the current recommendation for a single SKU. Use the include parameter to expand the rationale and guardrails.
curl https://api.elastly.io/v1/prices/SKU-1042?include=rationale \
-H "Authorization: Bearer pw_live_8fK2…"{
"sku": "SKU-1042",
"currency": "USD",
"recommended_price": 47.50,
"current_price": 44.90,
"change_pct": 5.8,
"rationale": "Demand +12% w/w; two competitors raised prices.",
"guardrails": { "floor": 32.00, "ceiling": 58.00 },
"updated_at": "2026-06-12T09:14:00Z"
}Approve a price
Approves a recommended price and publishes it to your connected channels. The price must sit within the SKU's guardrails or the request is rejected with 422.
curl -X POST https://api.elastly.io/v1/prices/approve \
-H "Authorization: Bearer pw_live_8fK2…" \
-H "Content-Type: application/json" \
-d '{ "sku": "SKU-1042", "price": 47.50 }'