DOCS/REST API
⌘K
v1
API reference

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.

http
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.

StatusCodeMeaning
400bad_requestThe request was malformed or missing a field.
401unauthorizedMissing or invalid API key.
422guardrail_violationPrice falls outside the SKU's floor or ceiling.
429rate_limitedToo many requests — slow down and retry.
5xxserver_errorSomething went wrong on our end. Retry with backoff.

Retrieve a price

GET/v1/prices/:sku

Returns the current recommendation for a single SKU. Use the include parameter to expand the rationale and guardrails.

bash
curl https://api.elastly.io/v1/prices/SKU-1042?include=rationale \
  -H "Authorization: Bearer pw_live_8fK2…"
json
{
  "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

POST/v1/prices/approve

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.

bash
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 }'