eSMS AfricaeSMS Africa
eSMS Voice

Voice errors

Every eSMS Voice API error code with its HTTP status and what to do, plus the status_reason and error_code values a finished call can carry.

Refused calls are never charged

A live call to a country that is available on request returns 503 destination_unavailable with details.availability: "on_request" before anything is held or charged. The sandbox (esms_test_ keys) is not affected.

Voice uses the same error envelope as the rest of the eSMS API. Branch on error.code; the wording of error.message can change.

{
  "error": {
    "code": "country_not_allowed",
    "message": "Voice calls to this country are not enabled for your account.",
    "request_id": "3f9a1c2b4d5e6f708192a3b4c5d6e7f8",
    "details": { "country": "KE" }
  },
  "detail": { "code": "country_not_allowed", "...": "..." }
}

A refused request never places a call and never holds money.

Request errors

Checked in roughly this order when you create a call: account, scope, live voice switch, account enabled, phone number, country, price, country live today, caller number, flow, pause switches, rate, concurrency, daily cap, balance.

HTTPcodeMeaningWhat to do
400idempotency_key_requiredNo Idempotency-Key header, or longer than 80 characters.Send a unique key per call.
409idempotency_conflictThe key was already used with a different body.Use a new key for a new call; reuse a key only to retry the same request.
403insufficient_scopeThe API key lacks the voice scope (or query for reads).Create a key with the voice scope.
503voice_disabledLive voice calls are paused on the whole platform for a short time.Retry later; the sandbox keeps working.
403voice_not_enabledVoice has been turned off on your account.Contact support@esmsafrica.io.
403campaigns_not_enabledVoice campaigns have been turned off on your account.Contact support@esmsafrica.io.
400invalid_phoneto is not a valid phone number. details.reason says why.Send E.164, for example +256772123456.
403country_not_allowedYour account has a country list and this country is not on it.Ask us to add the country.
503destination_unavailableThe country has no price, is temporarily unavailable, or is available on request (details.availability: "on_request"). Nothing is charged.For on request, email sales@esmsafrica.io; otherwise retry later.
400invalid_caller_idfrom is not one of your caller numbers for this country.Use a number from GET /v1/voice/numbers, or omit from.
400invalid_flowThe flow breaks a rule; the message names the step. Also for an invalid max_duration_seconds.Fix the flow - see Call flows.
400flow_too_longThe flow's estimated length is over max_duration_seconds. details.estimated_seconds gives the estimate.Shorten the flow or raise max_duration_seconds.
400feature_not_availableA record, dial, transfer or conference step.Not available yet.
400invalid_metadatametadata is not an object or is over 2 KB.Keep metadata small.
400invalid_status_callbackstatus_callback is not a public https:// URL of at most 500 characters.Fix the URL.
503voice_pausedVoice calling is paused for your account, the country, or everywhere.Retry later.
429rate_limitedToo many calls per second for your account.Slow down and retry with backoff.
429concurrency_limitToo many calls in progress at once.Wait for calls to finish, then retry.
429daily_spend_cap_reachedToday's voice spend (UTC) would pass your daily cap. details: daily_spend_cap_usd, spent_today_usd.Wait for 00:00 UTC or ask for a higher cap.
402insufficient_balanceYour balance cannot cover the pre-call hold. details: required, available, currency, hint.Top up, or lower max_duration_seconds.
409invalid_stateThe action does not fit the call or campaign state, for example canceling a call that is already ringing.Check the status first.
404not_foundNo call, campaign or endpoint with that id on your account.Check the id and the key's environment (test keys only see test calls).
400invalid_requestA malformed field, unknown body field or bad query parameter.Read the message.
400invalid_urlA webhook endpoint URL is not a public https:// URL.Fix the URL.
400too_many_endpointsMore than 10 voice webhook endpoints.Remove one first.
400too_many_recipientsMore than 100,000 recipients on a campaign.Split the list.

Why a call did not complete

A call that ends without completing has a final status and, where useful, status_reason, error_code and retryable:

statusTypical error_code / status_reasonMeaningRetry?
busyrejectedThe line was busy or the person declined.Later.
no_answer-It rang but nobody answered.Later.
failedinvalid_numberThe number does not exist or is not reachable.No.
failednetwork_errorA temporary network problem. retryable: true.Yes, after a short delay.
failedprovider_unknownWe could not confirm whether the call connected within 10 minutes. The hold is released.Check the person was not reached, then retry.
failedno_final_statusNo final status arrived within 2 hours.Check before retrying.
faileddestination_unavailableThe country could not be reached at dial time.Later.
failedcarrier_errorThe voice network refused the call for another reason.Later; contact support if it repeats.
failedinvalid_caller_idThe caller number was refused for this destination.Contact support.
failedexpiredThe call stayed queued for more than 2 hours (for example while voice was paused).Create a new call if still needed.
canceledcanceledYou canceled the call while it was queued.-

status_reason can be completed, busy, rejected, no_answer, invalid_number, network_error, unknown, route_failed, no_route, provider_unknown, no_final_status, canceled, hangup or expired.

Unanswered calls are not charged. Campaign retries apply only to busy, no_answer and retryable failures (see the Campaigns API).

On this page