Skip to main content

What it is

YCloud uses HTTP status codes and a structured error body so your application can decide whether to fix, reject, or retry a request.

Response

A failed request returns an error object.

Error fields

Error codes

Use error.code to distinguish failures that share an HTTP status. This catalog lists the YCloud API error codes; an endpoint may document additional errors. For account and sender quotas, see Rate limits. Meta errors can also appear in error.whatsappApiError after a request reaches WhatsApp. Preserve those details together with the YCloud error code.

How to handle the response

Request correlation

Log the endpoint, HTTP method, response status, YCloud requestId, and your own correlation ID. Remove API keys and personal data. This gives you enough evidence to investigate a failure without exposing secrets.

Retry safely

Retry read-only requests when the failure is temporary. Use caution with message sends and other create operations. A repeated POST can create a second resource or send a duplicate message. When supported by the request schema, set externalId to a unique value from your system. Store the YCloud response ID after a successful request.
Include the requestId, endpoint, HTTP status, and time of failure when contacting YCloud support. Remove API keys and personal data first.

Implementation checklist

  • Parse errors by code, not by matching message text.
  • Set timeouts on every outbound request.
  • Retry only temporary failures.
  • Add exponential backoff, jitter, and a maximum attempt count.
  • Prevent duplicate POST effects with your own stable identifier when the request supports one.