ZapyFlow/API documentationopenapi.json

Errors

Every error carries a stable machine code, a human message and a request id. 95 codes are in use.

Shape

json
{
  "error": "INSUFFICIENT_SCOPE",
  "reason": "SCOPE_NOT_GRANTED",
  "message": "Your role does not allow this action.",
  "request_id": "req_01J..."
}

error is the contract — switch on it. reason is extra precision where the platform can give it. message is written for a person and is localised; never parse it. request_id also arrives as the x-request-id response header, on every response including ones with no body — quote it when you contact support.

Platform errors

These come from the transport layer and can appear on any endpoint.

CodeStatus
NOT_FOUND404, 409
BAD_REQUEST400
RATE_LIMITED429
UNAUTHORIZED401
FORBIDDEN403
IDEMPOTENCY_IN_PROGRESS409
IDEMPOTENCY_KEY_REUSED409
VALIDATION_ERROR400

Domain errors

This list is extracted from the source, not curated by hand — which is why it is complete and also why it is flat. A code appears here if some endpoint can return it; which endpoints, and when, is in that endpoint's own reference entry.
CodeStatusSites
LIMIT_REACHED403, 409, 4227
INVALID_FLOW4006
CONFLICT4095
DUPLICATE_NAME4094
INCOMPLETE_ONBOARDING4223
INVALID_CODE4003
RATE_LIMIT4293
UPLOAD_ERROR5003
ACKNOWLEDGEMENT_REQUIRED4282
AGENT_HAS_CHANNELS4092
ATTACHMENT_FAILED5022
AUDIO_TOO_LARGE4132
CHANNEL_ASSET_INCOMPATIBLE4002
CHUNK_LIMIT_REACHED4092
EMAIL_IN_USE4092
FEATURE_NOT_AVAILABLE4032
FILE_TOO_LARGE4132
INTERNAL_STEP_NOT_ALLOWED4002
INVALID_OFFER4002
INVALID_WEBHOOK_SIGNATURE4012
STALE_WRITE4122
TOO_MANY—2
TRANSCRIPTION_FAILED5022
UNSUPPORTED_AUDIO4002
UNSUPPORTED_FILE4002
WEBHOOK_NOT_CONFIGURED5032
AGENT_HAS_DATA4091
ALREADY_CLASSIFIED4091
ALREADY_VERIFIED4091
ASSIGNEE_NOT_IN_TEAM4221
BASE_HAS_SOURCES4091
BASE_IS_DEFAULT4091
BASE_NOT_IN_TEAM4221
BOUNDARY_EVAL_REQUIRED4091
CANNOT_REVOKE_CURRENT4091
CODE_EXPIRED4001
CONNECTION_NOT_STARTED4091
DEFAULT_PIPELINE4001
DELETE_FAILED4001
DISCOUNT_ALREADY_USED4091
DRAFT_NOT_READY4001
DUPLICATE—1
DUPLICATE_SHORTCUT4091
EMAIL_ALREADY_VERIFIED4001
ENDPOINT_DISABLED4091
FAQ_LIMIT_REACHED4001
FLOW_INACTIVE4001
GOOGLE_AUTH_UNAVAILABLE—1
IMPLEMENTATION_ORDER_IN_PROGRESS4091
INVALID_CONFIG—1
INVALID_CSV4001
INVALID_FUNCTION4001
INVALID_GOOGLE_FLOW4221
INVALID_OPERATIONS4001
INVALID_ORDER4001
INVALID_PHONE4001
INVALID_POLICY4001
INVALID_REASON4001
INVALID_STATE4091
INVALID_WEBHOOK_URL4221
MARKETING_ATTESTATION_RATE_LIMITED4291
META_GRAPH_ERROR—1
METHOD_NOT_ALLOWED4051
NO_FUNCTION4001
NOT_REACTABLE4001
OFFER_NOT_DISCOUNT4001
OFFER_NOT_FOUND4041
PASSWORD_ALREADY_SET4091
PAYMENT_PROVIDER_UPDATE_REQUIRED4001
PAYMENT_REQUIRED4001
PLAN_FULL4091
QUOTA_EXCEEDED4021
REASSIGN_TO_SELF4001
RULES_TOO_LONG4001
SAME_EMAIL4001
SERVER_ONLY_EVENT4001
SLOT_OCCUPIED—1
STAGE_IN_USE4091
STAGE_NOT_EMPTY4001
TEXT_TOO_LONG4001
UNKNOWN_ACTION4221
VERIFICATION_EMAIL_FAILED4001
VOICE_QUOTA_EXCEEDED4021
VOICE_SYNTHESIS_FAILED5031
WEBHOOK_ENQUEUE_FAILED5031
WHATSAPP_CONNECTION_FAILED5021
WRONG_PROVIDER4001

What to retry

Retry 429 (after Retry-After) and 5xx, with backoff. Never retry 4xx other than 429 — the request will fail the same way. For creations, retry with the same Idempotency-Key so the retry cannot duplicate.