Begin hier

Fouten en retries

Parse de standaard JSON-foutenvelop en bepaal wanneer een retry veilig is.

Foutenvelop

Mislukte JSON API-calls gebruiken één error-object op het hoogste niveau met een leesbare message, de numerieke HTTP-status en een optionele, stabiele code. Het OpenAPI-contract verwijst naar dit schema voor verwachte en onverwachte fouten.

Foutrespons
{
  "error": {
    "code": "invalid_request",
    "message": "A verified From domain is required",
    "status": 403
  }
}

Clientfouten

Corrigeer invoerfouten met 400 voordat je het opnieuw probeert. Vervang of trek ongeldige credentials in na een 401. Een 402 vereist een betaald abonnement, 403 markeert een beleids- of rechtengrens, 404 is een ontbrekende resource binnen de tenant, 409 is een status- of idempotentieconflict, 413 overschrijdt de limieten voor bijlagen en 422 dekt validatie of suppressie.

Beslissen over retries

Do not automatically retry authentication, validation, suppression, conflict, or 402 subscription_required failures. A 402 means the workspace has no active subscription; choose a plan, then send. A 423 with code sender_paused means the exact From identity is paused. A 423 with code account_paused means the workspace is paused for review: the body includes the measured bounce and complaint rates and the limits they crossed (bounce_rate vs bounce_limit, complaint_rate vs complaint_limit). Stop that stream. A 429 with code daily_limit_reached is the workspace daily ladder, not a short backoff. Wait until resets_at (midnight UTC). Retry-After is the seconds until then. hourly_limit_reached waits until the next UTC hour. gmail_recipient_limit waits until midnight UTC. The refused message was not queued. Other 429 responses (quota_exhausted) wait until that monthly, per-sender, or attachment limit resets. A caller may retry a transient 502 or 503 with bounded exponential backoff and jitter. Preserve the same Idempotency-Key and identical JSON payload when retrying one logical send.

Context voor support

Noteer het tijdstip van het request, de route, de HTTP-status, het SendHQ-resource-ID en niet-geheime foutvelden. Zet nooit een API-sleutel, sessiecookie, berichttekst of ontvangerslijst in een supportmelding.