Afilipost ← Back to the front page

Errors

What each status means and how to retry safely.

Errors answer with { "error": "…" } and a sentence you can show a person.

Status codes

Status Meaning
401 The API key is missing, malformed or revoked.
400 The request body is wrong — the message says which field.
404 The record exists for someone else, or not at all. Both answer the same way on purpose.
413 Storage quota is full. Delete old media from the panel, or wait for the automatic cleanup of published files.
429 Too many requests from this address. The Retry-After header says how many seconds to wait.
409 The state does not allow it: the 24-hour reply window closed, the account is no longer connected, or the resource is busy.

Build retries on idempotency, not on error parsing

A network failure is indistinguishable from a slow success. Send idempotencyKey on /v1/posts and retry fearlessly: a request that already succeeded returns the existing post under existingPost instead of creating a duplicate.

Where to look when something fails