Developers / Errors

Errors

Every error is problem+json with a stable code. Branch on the code, show the detail to people, and retry only what's safe.

Updated 4 November 2026API v1.0.1

The error format#

A real 401
{
  "type": "urn:problem:missing_api_key",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Send your API key in the X-API-Key header. Keys are created in the admin under Settings → API access.",
  "instance": "/api/v1/account",
  "code": "missing_api_key"
}
FieldWhat it is
typeurn:problem:<code>.
titleShort summary of the kind of problem.
statusHTTP status.
detailWhat went wrong, for a person.
instanceThe request path.
codeStable machine-readable code.
errorsPer-field problems, for validation_failed.

When fields are wrong, validation_failed lists each one in errors:

400 validation_failed
{
  "type": "urn:problem:validation_failed",
  "title": "Invalid request",
  "status": 400,
  "detail": "Some fields are missing or invalid.",
  "instance": "/api/v1/payments",
  "code": "validation_failed",
  "errors": [
    { "field": "amount", "message": "must not be null" }
  ]
}
422, refused by a business rule
{
  "type": "urn:problem:same_plan",
  "title": "Request refused",
  "status": 422,
  "detail": "The subscriber is already on Home 10 Mbps.",
  "instance": "/api/v1/subscribers/3f2a6c1e-8b7d-4c1a-9e2f-1a2b3c4d5e6f/plan",
  "code": "same_plan"
}

What to do with an error#

When you getDo this
429 rate_limitedWait Retry-After seconds, then retry the same request.
409 idempotency_in_progressYour first try is still running. Retry the same request in a few seconds.
500 internal_errorRetry a read with a growing pause. For a write, retry with the same Idempotency-Key, or read the record back first.
A network error or timeoutSame as a 500: you don't know if it arrived. Retry with the same Idempotency-Key.
400, 401, 403, 404, 422Don't retry it unchanged. Fix the request, the key or the data first.

Treat a code you don't recognise by its HTTP status. New codes may be added to v1.

Status codes#

StatusMeaning
200 OKDone. For a write, also when there was nothing to change (already suspended, already active, receipt already recorded).
201 CreatedA payment was recorded or an endpoint added.
202 AcceptedYour ISP requires approval for this suspension. A request was filed; nothing has changed yet.
204 No ContentDeleted.
400 Bad RequestThe request is malformed or a parameter is invalid.
401 UnauthorizedNo key, or the key is wrong, revoked or expired.
403 ForbiddenThe key lacks the scope, its creator lacks the permission, or the ISP's account is suspended.
404 Not FoundNo such record in your ISP's account, or no such operation.
405 Method Not AllowedThat path doesn't take that method.
409 ConflictClashes with a request in progress or an existing record.
415 Unsupported Media TypeSend the body as application/json.
422 UnprocessableUnderstood but refused by a business rule. Nothing changed.
429 Too Many RequestsRate limit reached for this key.
500 Internal Server ErrorSomething went wrong on our side. It has been logged.

Error codes#

CodeStatusWhat it means
invalid_request400A value breaks a rule, for example an amount of zero, or notes missing when reason is OTHER. detail says which.
validation_failed400Fields are missing or invalid. errors lists each one.
malformed_body400The body is missing or isn't valid JSON for this operation.
missing_parameter400A required query parameter is missing.
missing_header400A required header is missing.
invalid_parameter400A parameter has a value of the wrong type.
idempotency_key_required400This operation needs an Idempotency-Key header.
missing_api_key401No X-API-Key header.
invalid_api_key401CoreSync doesn't know this key.
api_key_revoked401The key was revoked.
api_key_expired401The key passed its expiry date.
insufficient_scope403The key doesn't have the scope this operation needs.
key_owner_lacks_permission403The person who created the key doesn't hold the permission behind this operation.
tenant_suspended403Your CoreSync account is suspended or cancelled.
tenant_terminated403Your CoreSync account has been terminated.
not_found404No such record in your ISP's account. A malformed id answers this too.
no_such_operation404There is no operation at this path.
method_not_allowed405This path doesn't take this method.
idempotency_in_progress409A request with this Idempotency-Key is still running. Retry shortly.
duplicate_reference409This provider and receipt are already recorded for another subscriber.
unsupported_media_type415The body isn't application/json.
idempotency_key_reused422This Idempotency-Key was used for a different request. Use a new key for new work.
invalid_state422The subscriber isn't in a state that allows this, for example suspending one that isn't ACTIVE.
same_plan422The subscriber is already on that plan.
plan_inactive422The plan isn't ACTIVE, so it can't be assigned.
no_subscription422The subscriber has no subscription yet. Assign a first plan in the admin.
no_active_subscription422There's no active subscription to reactivate. Record a payment instead, which renews it.
currency_mismatch422The payment isn't in your ISP's currency.
payment_not_applied422The payment was recorded but couldn't be applied. It's listed as unmatched. Retry with the same Idempotency-Key, or apply it from Payments in the admin.
suspend_failed422The suspension couldn't be completed. detail says why.
reactivate_failed422The reactivation couldn't be completed. detail says why.
plan_change_failed422The plan change couldn't be completed. detail says why.
approval_unavailable422This action needs approval, and the key has no creator to file the request under. Create the key again from the admin.
invalid_webhook422The webhook URL or events break a rule, or you already have 10 endpoints. detail says which.
rate_limited429Too many requests for this key. Wait Retry-After seconds.
internal_error500Unexpected error on our side. If it was a write, read the record back before retrying.

Each operation in the reference lists the codes it can return.

NextPagination →

Stuck, or missing something? Tell us what you're building.

hello@coresyncisp.com