JT Noble SMS documentation home

Errors

Every error has the same JSON shape, a status code and a short code you can test for.

Error shape

{
  "error": {
    "code": "destination_not_allowed",
    "message": "We do not send to this country.",
    "request_id": "8b1f0c2a4d6e4f10a3c5d7e9f1b2c3d4",
    "details": {
      "field": "to",
      "value": "+15551234567",
      "country": "US",
      "hint": "See https://sms.jtnoble.com/coverage for the countries we send to. Nothing was charged."
    }
  },
  "detail": { "code": "destination_not_allowed", "message": "..." }
}
  • Test for error.code in your code. The message text can change.
  • error.details is there when there is more to say, for example required and available on insufficient_balance.
  • detail repeats the error for older clients. New code should read error.
  • Give us the request_id when you contact support. It is also in the X-Request-Id response header.

The account service (auth.sms.jtnoble.com) and the SMPP portal API (smpp.sms.jtnoble.com/api) answer with the same shape.

Common errors

HTTPCodeWhat it meansWhat to do
400bad_requestSomething in the request is wrong.Read message and fix the request.
400invalid_phone, invalid_phone_lengthThe number is not a valid mobile number.Check the digits. See details.hint.
400feature_not_enabledflash, validity_period, priority or binary is not on sale yet.Leave the field out.
400invalid_webhook_urlThe webhook URL is private or local.Use a public URL.
401unauthorizedNo key, or the key is wrong or revoked.Check the Authorization header.
402insufficient_balanceYour balance does not cover the message.Top up, then send again.
403insufficient_scopeThe key may not do this action.Use a key with the right scope.
403portal_onlyOnly available in the dashboard.Sign in to the dashboard.
403recipient_opted_outThe number replied STOP to you.Do not send to this number.
403recipient_dndThe number is on the do-not-disturb list.Do not send to this number.
403sender_not_approvedThe sender ID is not approved on your account.Use an approved sender, or leave it out.
404not_foundNo such item, or it is not yours.Check the id.
409duplicate_messageSame text to the same number within 5 minutes, with duplicate protection on.Wait, or turn the protection off.
409content_review_requiredThe text waits for a review by an administrator.Wait for the decision.
413message_too_longMore than 10 segments.Shorten the message.
422destination_not_allowedThe number is in a country we do not send to.Check the number and the coverage list.
422content_rejectedThe text breaks the content rules.Change the text.
422validation_errorA field is missing or has the wrong type. See error.details.errors.Fix the field.
429rate_limitedToo many requests.Slow down. Wait for Retry-After when it is present.
429verify_rate_limitedA Verify limit was reached.Wait for Retry-After.
500internal_errorSomething broke on our side.Retry later. Contact support with the request_id.
502otp_send_failedA Verify code could not be sent. Nothing was charged.Retry.
503destination_unavailableSending to this country is paused. Nothing was charged.Retry later.

Retrying

  • Retry 429, 500, 502 and 503 after a short wait, doubling the wait each time.
  • Always send an Idempotency-Key on sends, so a retry is never charged twice.
  • Do not retry 400, 401, 402, 403, 404 or 422 without changing something first.

Every code on the send routes

This table is built from the service code and is checked by its tests. (value) stands for a value filled in at run time.

HTTPcodeExact error.message
400bad_requestA message with status '(value)' cannot be retried.
All recipients are opted out or duplicates
At least one phone number is required
At least one recipient is required
Cannot detect country from phone numbers
Cannot detect the country of this phone number.
Invalid route code: (value)
Invalid route code: (value).
Invalid (value) - use ISO 8601
Message text is required
No active route for country (value)
No contacts found
Provide at least one message id in ?ids=
Provide contact_list_ids or recipients
Rate check is limited to 1000 recipients per call
Route no longer exists
Validation is limited to 1000 numbers per call
drip_rate (messages per minute, 1-5000) is required when schedule_mode is 'drip'
schedule_mode must be 'now' or 'scheduled'
schedule_mode must be 'now', 'scheduled' or 'drip'
scheduled_at is required when schedule_mode is 'scheduled'
scheduled_at must be an ISO 8601 date and time with a timezone.
scheduled_at must be at least 5 minutes in the future
scheduled_at must be within 7 days from now
text is required
400destinations_unavailableNone of the recipients are in an available country.
400empty_messageThe message is empty.
400feature_not_enabled(value) is not enabled on this platform yet.
400invalid_audienceUnknown audience source type (value)
400invalid_binaryBinary payload is (value) octets; one SMS carries at most (value).
UCS-2 binary data must be an even number of octets
Unknown binary field(s): (value)
binary must be an object: {data, udh?, data_coding?}
binary.data is required (hex)
binary.data_coding must be 4 (8-bit data) or 8 (UCS-2)
binary.udh has a truncated information element
binary.udh information element overruns the header
binary.udh is too short (UDHL + at least one IE header)
binary.udh length byte (UDHL) is (value) but (value) header octets follow
binary.(value) must be a hex string
binary.(value) must contain only hex digits 0-9 a-f
binary.(value) must have an even number of hex digits (whole octets)
400invalid_callback_urlcallback_url must be a public https URL
400invalid_destinationThis is not a valid phone number.
400invalid_message_typemessage_type must be transactional or promotional
400invalid_optionFlash and binary SMS are not supported for destinations in (value) yet.
Send either text or binary, not both
binary payloads are only supported on single sends
flash can't be combined with binary
flash must be true or false
priority must be 0 (normal), 1, 2 or 3 (highest)
text is required
validity_period must be a whole number of minutes between 1 and (value)
400invalid_phoneThe phone number is empty.
This is not a valid mobile number.
This is not a valid phone number.
400invalid_phone_lengthThe phone number has the wrong length for its country.
400invalid_quiet_hours(varies)
400invalid_scheduleSchedule within the next 12 months
schedule.at is required for a scheduled campaign
schedule.mode must be now, scheduled or recurring
schedule.recurrence is required for a recurring campaign
400invalid_statusstatus must be one of (value)
400invalid_timezoneUnknown timezone (value) (use an IANA name like Africa/Lagos)
400invalid_workspaceX-Workspace must be a workspace id.
400legacy_campaignRetry is available for campaigns sent with the new engine.
400missing_merge_fieldSome recipients have no value for (value).
400nothing_to_retryNo failed recipients to retry.
400phone_not_verifiedAdd and verify your phone number in your profile to receive tests.
400recipients_requiredPass recipients (with a template) or messages.
400recurrence_endedThe repeat rule has no future runs.
400sandbox_no_retrySandbox (test) messages cannot be retried.
400sandbox_no_scheduleTest keys cannot schedule sends.
400scheduled_needs_listScheduled bulk sends need a contact list.
400template_requiredPass template (or template_id) or a text per recipient.
400text_requiredEvery entry in messages needs text.
400to_requiredPass to with up to 3 of your own numbers.
400too_many_recipientsAt most (value) inline recipients per request; use POST /v1/imports for bigger lists.
400unsupported_wallet_currencyWallet currency (value) is not supported for sending.
401unauthorizedInvalid API key
Invalid or expired token
Invalid token type
Not authenticated
Session has been revoked
402insufficient_balanceInsufficient balance for the test message ((value) (value)).
Insufficient balance to retry this message.
Insufficient balance.
Sandbox: simulated insufficient balance (magic number).
Your balance is negative.
402payment_requiredInsufficient balance.
403account_suspendedThis account is paused for a payment review.
This account is suspended.
403country_blockedSending is disabled for this account.
403country_not_enabledSending to (value) is not enabled for this account.
403forbiddenAdmin access required
403insufficient_scopeThis API key is not authorised for '(value)'.
403no_accountSend refused: no account context.
403not_a_memberYou are not a member of this workspace.
403recipient_opted_outThe recipient has opted out.
403reseller_onlyReseller access required.
403role_forbiddenOnly an approver, an admin or the owner can approve campaigns.
Only an approver, an admin or the owner can reject campaigns.
403route_country_mismatchThis number cannot be sent on the selected route.
route (value) can only carry (value) numbers.
403self_approvalYou submitted this campaign - another approver must approve it (maker-checker).
403sender_id_requiredA registered sender ID is required for (value).
A registered sender ID is required.
403sender_not_approvedNo sender ID available.
Sender ID '(value)' is not approved for (value).
Sender ID '(value)' is not approved.
403support_onlySupport access required.
404group_not_foundContact group (value) not found
404import_not_foundImport (value) not found
404not_foundBatch not found
Campaign not found
Contact list (value) not found
Message not found
Segment not found
404segment_not_foundSegment (value) not found
404template_not_foundTemplate not found
404workspace_not_foundWorkspace not found.
409busyPause or cancel the campaign before deleting it.
Wait for the campaign to finish before retrying failed recipients.
409conflictDuplicate request (idempotency conflict)
409delivery_being_confirmedThis message is still being confirmed with the network.
409duplicate_messageAn identical message was sent to this number in the last 5 minutes.
409finishedThe campaign is already (value).
409has_historyA campaign that sent messages cannot be deleted.
409idempotency_in_progressA request with this Idempotency-Key is still being processed.
409import_not_readyImport (value) is (value) - process it first
409not_cancellableOnly a scheduled batch that has not started can be cancelled (this one is '(value)').
Only a scheduled message can be cancelled (this one is '(value)').
409not_editableA (value) campaign can't be edited. Duplicate it instead.
A (value) campaign is already prepared.
409not_launchableA (value) campaign can't be launched.
409not_pausedOnly a paused campaign can be resumed.
409not_pendingThis campaign is not waiting for approval.
409not_runningA (value) campaign can't be paused.
413message_too_longA message renders to (value) segments; the maximum is (value).
Message is (value) segments; the maximum is (value) ((value) chars = 1 segment for (value)).
422destination_not_allowedWe do not send to this country.
422launch_blockedThis campaign cannot be launched yet.
422validation_errorRequest validation failed
422value_too_longOne of the values is too long.
429rate_limitedRate limit exceeded: (value)
500internal_errorInternal server error
503destination_unavailableSending to this country is not available right now.

Each route's own errors are in the API reference.

On this page