Docs
Error codes
Every error the API returns. API errors use the envelope {error: {code, message, param, details, doc_url, request_id}}; message failures appear as the message's error.code.
Authentication
Request validation
- invalid_requestHTTP 400
- The request is invalid.
- payload_too_largeHTTP 413
- The request body exceeds 1 MB.
- batch_too_largeHTTP 400
- A batch may contain at most 1000 messages.
Recipient
- invalid_phoneHTTP 400
- The phone number is not a valid Mongolian mobile number.
- unroutable_numberHTTP 400
- No operator serves this number range.
- operator_not_supportedHTTP 400
- The recipient's operator is not supported.
- recipient_opted_outHTTP 400
- The recipient has opted out of messages from this project.
Message content
- empty_bodyHTTP 400
- The message body is empty.
- message_too_longHTTP 400
- The message needs more parts than max_parts allows.
- template_not_foundHTTP 404
- The template does not exist.
- template_variable_missingHTTP 400
- The template references variables that were not provided.
Billing
- insufficient_balanceHTTP 402
- The workspace balance is too low for this request.
- spend_cap_reachedHTTP 402
- This request would exceed a spend cap.
Rate limits
- rate_limitedHTTP 429
- Too many requests. Slow down.
- otp_rate_limitedHTTP 429
- Too many verification codes were sent to this number. Try again later.
Idempotency
- idempotency_key_in_useHTTP 409
- A request with this Idempotency-Key is still being processed.
- idempotency_key_reusedHTTP 422
- This Idempotency-Key was already used with a different request.
Messages and OTP
- message_not_cancelableHTTP 409
- Only scheduled or queued messages can be canceled.
- otp_not_foundHTTP 404
- No matching verification was found.
Server
- internal_errorHTTP 500
- Something went wrong on our side.
Message status errors
- operator_rejectedmessage status
- The operator rejected the message.
- recipient_off_networkmessage status
- The number is not on the operator's network.
- operator_unreachablemessage status
- The operator could not be reached; retries were exhausted.
- operator_not_configuredmessage status
- The operator gateway is not configured on this instance.
- operator_response_unrecognizedmessage status
- The operator replied with an unrecognized response; the message may have been sent.
- operator_timeoutmessage status
- The operator did not answer in time; the message may have been sent.
- partial_sendmessage status
- Only some parts of the message were sent; unsent parts were refunded.
- worker_interruptedmessage status
- Sending was interrupted; the message may have been sent.
- expiredmessage status
- The message expired before it could be sent.
- canceledmessage status
- The message was canceled.