Errors

Every error code, why it happens, and how to fix it.

Request IDs

Every response — success or error — includes a request ID, both as a header and in the JSON body. Include it when contacting support; it maps directly to server-side logs for that exact request.

Response headers
X-Request-ID: req_5c9e2f2a-...

Response shapes

Success responses are always a flat data object plus a request_id:

Success
{
  "data": { "...": "..." },
  "request_id": "req_..."
}

Errors always look like this:

Error
{
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "API rate limit exceeded",
    "request_id": "req_..."
  }
}

Error reference

401 UnauthorizedUNAUTHORIZED

Missing, malformed, unknown, revoked, or expired key.

Common cause

The Authorization header is missing, doesn't start with 'Bearer ', or the key isn't valid anymore.

Fix

Check the Authorization header and verify the key is still active in Settings → API Access. The message is intentionally generic for all of these cases — the API never reveals which one it was.

403 ForbiddenAPI_ACCESS_DISABLED

Your account doesn't currently have API access.

Common cause

API access is granted per account by Stynar, not by plan — your account hasn't been enabled yet.

Fix

Contact Stynar support to request access. See the Quickstart guide.

403 ForbiddenINSUFFICIENT_SCOPE

The key doesn't have the scope this endpoint requires.

Common cause

The key was created with only 'read' scope but the endpoint needs 'write' (or vice versa).

Fix

Create a new key with the required scope from Settings → API Access — scopes can't be changed on an existing key.

404 Not FoundNOT_FOUND

Unknown route, or a resource that doesn't exist / isn't yours.

Common cause

Either the path is wrong, or the resource ID belongs to a different account.

Fix

Double check the path and ID. This is intentionally the same response for both cases — a key can never distinguish 'not yours' from 'doesn't exist'.

409 ConflictCONFLICT

The action can't be applied to the resource's current state.

Common cause

For example, trying to pause a campaign that isn't currently running.

Fix

Fetch the resource's current state first (e.g. GET the campaign) and confirm the action is valid from there.

429 Too Many RequestsRATE_LIMIT_EXCEEDED

Per-minute or per-second limit hit.

Common cause

Too many requests from this key in the current window.

Fix

Wait out the Retry-After header value, then retry. See Rate Limits.

429 Too Many RequestsQUOTA_EXCEEDED

Monthly quota exhausted.

Common cause

Your account's monthlyRequests limit has been used up for the current calendar month.

Fix

Wait for next month's reset, or contact Stynar if you need a higher quota.

500 Internal Server ErrorINTERNAL_ERROR

Something broke on Stynar's end.

Common cause

An unexpected server-side failure, not caused by your request.

Fix

Retry with backoff. If it persists, contact support with the request_id from the response.

Tenant isolation

A request for a resource that exists but belongs to a different account returns the same 404 as a resource that doesn't exist at all. Your key can never see or act on another account's data.

401 and 403 both relate to authentication — see Authentication. 429s are covered in more depth on Rate Limits.