Guides

Errors

Success responses use success: true with optional data and meta. Failures use success: false, a human message, and optional code / details.

Success envelope

{
  "success": true,
  "message": "Template send accepted",
  "data": {
    "to": "919876543210",
    "templateId": "42",
    "templateName": "new_user",
    "status": "accepted"
  }
}

Error envelope

{
  "success": false,
  "message": "WhatsApp template is not APPROVED",
  "code": "TEMPLATE_NOT_APPROVED"
}

Common status codes

CodeMeaning
200OK - list returned, or a booking / service updated
201Created - a new booking
202Accepted - message queued for sending
400Validation, WhatsApp not connected, template not approved, 24-hour window closed, or a booking status change that is not allowed
401Missing, invalid or revoked API key / token, or an API key is required
402The workspace's plan has expired (PLAN_EXPIRED)
403JWT user is not the owner or a member of the workspace
404Template, workspace, booking, service or staff member not found
409Booking conflict - slot taken (SLOT_FULL) or customer at their limit (CUSTOMER_LIMIT)
429Rate limit - more than 60 requests per minute for one API key
500Queue unavailable or unexpected server error
502 / 503Bookings are temporarily unavailable - retry shortly

Machine codes

codeWhen
VALIDATION_ERRORRequest body or query failed validation (see details)
API_KEY_INVALIDAPI key unknown or revoked
API_KEY_REQUIREDRoute needs a workspace API key; a Passport JWT is not accepted
RATE_LIMITEDMore than 60 requests per minute for this API key
WA_NOT_CONNECTEDWhatsApp connection missing for workspace
WA_PHONE_INVALIDfrom does not match a WhatsApp number in the workspace
WA_PHONE_MISSINGNo Meta phone number configured
WA_WINDOW_CLOSEDNo customer message in the last 24 hours - use a template
MESSAGE_REQUIREDtype text without a message
MEDIA_URL_REQUIREDtype image / document without mediaUrl
TEMPLATE_NOT_FOUNDTemplate not found, or not in the API key's workspace
TEMPLATE_NOT_APPROVEDTemplate status is not APPROVED
TEMPLATE_PARAMS_INVALIDparameters do not match the template variables
INVALID_RECIPIENTto is not a valid phone number
WORKSPACE_ACCESS_DENIEDJWT user is not the owner or a member of the workspace
WORKSPACE_NOT_FOUNDWorkspace does not exist
QUEUE_UNAVAILABLEFailed to enqueue send job
SLOT_FULLNothing is free at that time: taken, outside working hours, on leave, too soon, too far ahead, or the service is closed. Read availability again
CUSTOMER_LIMITThis customer is already at their per-day or active-booking limit; details.existing is the booking in the way
BOOKING_NOT_FOUNDNo such service, staff member, or booking with that external_ref
BOOKING_INVALIDRejected by the booking rules, e.g. changing a cancelled booking
BOOKING_CONFLICTAny other booking conflict
BOOKINGS_UNAVAILABLEBookings are temporarily unavailable (503) - retry
BOOKINGS_UPSTREAM_ERRORBookings failed on our side (502) - retry; contact support if it persists
PLAN_EXPIREDThe workspace's trial or paid plan has ended - renew it in the app
TOKEN_EXPIREDAccess token expired
TOKEN_REVOKED_OR_MISSINGToken revoked or missing in DB