Error Codes

When an API request fails, Sendiee returns a JSON response with a success: false flag, an error code, and a human-readable message. Use the error code for programmatic handling.

Error Response Format

JSON
{
  "success": false,
  "code": "ERROR_CODE",
  "message": "Human-readable error description"
}

Rate Limiting

Error CodeHTTPMeaning
RATE_LIMIT_EXCEEDED_PER_SECOND429Organisation exceeded the per-second request limit on their plan
RATE_LIMIT_EXCEEDED_PER_DAY429Organisation exceeded the daily request limit on their plan

Authentication & Organisation

Error CodeHTTPMeaning
API_KEY_MISSING401No API key provided in the request
INVALID_API_KEY401The API key does not exist or is revoked
AUTHENTICATION_FAILED500Internal authentication error
ORG_INACTIVE403Your organisation account is inactive
DOMAIN_NOT_WHITELISTED403Request origin not in the allowed domains list
ORG_ID_MISSING400Internal: org ID could not be resolved
ORG_ID_REQUIRED400Organisation ID could not be resolved from the API key

Plan Enforcement

Error CodeHTTPMeaning
LIMIT_EXCEEDED403A numeric plan limit (e.g. max contacts, max tags) has been reached. Response includes limitKey, current, and limit fields.
FEATURE_NOT_ENABLED403The requested feature is not available on the organisation's current plan

WhatsApp & Messaging

Error CodeHTTPMeaning
BRAND_NUMBER_MISSING400brandNumber parameter not provided
WABA_NOT_FOUND404No active WhatsApp account for the given brandNumber
WABA_RETRIEVAL_FAILED500Internal error retrieving WhatsApp account
MISSING_RECIPIENT400The "to" field is required
INVALID_PHONE_NUMBER400Phone number failed validation
MISSING_TEMPLATE400Neither templateId nor templateName provided
TEMPLATE_NOT_FOUND404Template not found or not in APPROVED status
PARAMETER_VALIDATION_ERROR400Template parameters count mismatch
INVALID_SCHEDULE_TIME400Scheduled time is in the past
META_API_ERROR502Error returned by Meta's WhatsApp Cloud API
MESSAGE_SEND_FAILED500Internal error sending message
MISSING_CONTENT400Message content is empty or missing
MISSING_TEXT_BODY400Text message missing "body" field
MISSING_MEDIA_LINK400Media message missing "link" field
MESSAGE_NOT_FOUND404Message ID not found in this org
STATUS_FETCH_FAILED500Internal error fetching message status
SCHEDULE_NOT_CANCELLABLE400Message already sent or processing — cannot cancel

Contacts

Error CodeHTTPMeaning
MISSING_PHONE400phone field is required but was not provided
INVALID_PHONE_NUMBER400The provided phone number failed validation or formatting
INVALID_CUSTOM_FIELDS400customFields is not a plain object
CONTACT_NOT_FOUND404No contact found for the given identifier
CONTACT_ALREADY_EXISTS409A contact with this phone number already exists (duplicate key)

Contact Fields

Error CodeHTTPMeaning
INVALID_FIELD_TYPE_FILTER400The type query param is not one of "default", "custom", "all"
MISSING_FIELD_NAME400fieldName is required but was not provided
INVALID_FIELD_TYPE400fieldType is not one of: text, number, date, boolean, dropdown
MISSING_DROPDOWN_OPTIONS400options array is required and must be non-empty for dropdown type fields
INVALID_FIELD_KEY400A valid fieldKey could not be derived from the provided input
INVALID_FIELD_ID400The provided fieldId path param is not a valid MongoDB ObjectId
CUSTOM_FIELD_NOT_FOUND404No custom field found with the given fieldId for this organisation
CUSTOM_FIELD_ALREADY_EXISTS409A custom field with this fieldKey already exists for this organisation

Contact Tags

Error CodeHTTPMeaning
MISSING_TAG_NAME400name is required but was not provided
INVALID_TAG_ID400The provided tagId path param is not a valid MongoDB ObjectId
TAG_NOT_FOUND404No tag found with the given tagId for this organisation
TAG_ALREADY_EXISTS409A tag with this name already exists for this organisation

Wallet

Error CodeHTTPMeaning
WALLET_NOT_FOUND404No active wallet found for this organisation

Channels

Error CodeHTTPMeaning
INVALID_CHANNEL400The channel query param is not one of "whatsapp", "instagram", "messenger"
NO_CHANNELS_FOUND404No active business accounts found for the organisation (or for the specified brandNumber)

Generic

Error CodeHTTPMeaning
INTERNAL_SERVER_ERROR500An unexpected server-side error occurred

Handling Errors

  • 400 errors — Check your request parameters. The message field will explain what's wrong.
  • 401 errors — Verify your API key is correct and included in the Authorization header.
  • 403 errors — Check your account status, domain whitelisting, or plan limits.
  • 404 errors — The requested resource (template, contact, message, field, tag, etc.) was not found.
  • 409 errors — A resource with that identifier (phone, fieldKey, tag name) already exists.
  • 429 errors — Rate limit exceeded. Check the Retry-After header.
  • 500 errors — These are server-side issues. Retry with exponential backoff. If persistent, contact Sendiee support.