Errors


Public API — Error Reference

All API errors follow a consistent JSON response format and use error codes in the 33000–33999 range. Each error includes a moreInfo URL pointing to this page for quick reference.


Error Response Format

Every error response returns a JSON object with the following structure:

{
  "code": 33001,
  "message": "Authentication failed",
  "status": 401,
  "moreInfo": "https://docs.smsfactory.com/page/errors/33001"
}
FieldTypeDescription
codenumberA unique numeric error code identifying the specific error
messagestringA human-readable description of the error
statusnumberThe HTTP status code returned with the response
moreInfostringA URL linking to detailed documentation for this error

Error Code Reference

General Errors

CodeNameHTTP StatusMessage
33000UnexpectedError500 Internal Server ErrorAn unexpected error occurred
33007MessageSendFailed500 Internal Server ErrorFailed to send message

33000 — Unexpected Error

An unhandled or unknown internal error occurred. This is a catch-all for errors that do not match a more specific code. If you receive this error repeatedly, please contact support with the request details and timestamps.

33007 — Message Send Failed

The message (or broadcast job) could not be created or delivered due to an internal error in the messaging pipeline. Retry the request; if the problem persists, contact support.


Authentication & Authorization Errors

CodeNameHTTP StatusMessage
33001AuthenticationFailed401 UnauthorizedAuthentication failed
33004NumberNotOwned403 ForbiddenThe sender number is not assigned to this account
33010RecipientBlocked403 ForbiddenRecipient number is blocked
33011SenderBlocked403 ForbiddenSender number is blocked

33001 — Authentication Failed

The provided API credentials are invalid, missing, or the account is disabled. Verify your Authorization header uses the correct format:

Authorization: Basic <base64(keyId:keySecret)>

Common causes:

  • Missing or malformed Authorization header
  • Incorrect keyId or keySecret
  • API key has been revoked or expired
  • Account is suspended or disabled

33004 — Number Not Owned

The from number in the request is not assigned to the authenticated account. You can only send messages from numbers that have been provisioned and assigned to your account.

33010 — Recipient Blocked

The recipient (to) phone number has been blocked. This may occur because the recipient has opted out, or the number appears on a block list.

Note: This error applies to single-message sends only. Blocked recipients in broadcast sends are silently skipped.

33011 — Sender Blocked

The sender (from) phone number has been blocked or suspended. Contact support to resolve this issue.


Rate Limiting Errors

CodeNameHTTP StatusMessage
33002RateLimitExceeded429 Too Many RequestsRate limit exceeded
33012DailyQuotaReached429 Too Many RequestsDaily messaging quota reached

33002 — Rate Limit Exceeded

The account has exceeded the allowed number of requests within the current rate-limit window. Check the X-RateLimit-* response headers and wait until the Retry-After period has elapsed before retrying.

Default rate limits:

EndpointLimit
Send message10 requests / 60 s
Send broadcast5 requests / 60 s

33012 — Daily Quota Reached

The account has reached its daily messaging quota. The quota resets at midnight UTC. Contact support if you need a higher daily limit.


Validation Errors

CodeNameHTTP StatusMessage
33003InvalidPhoneNumber400 Bad RequestInvalid phone number format
33005MissingRequiredField400 Bad RequestA required field is missing
33006InvalidMessageType400 Bad RequestInvalid message type
33016InvalidMessageContent400 Bad RequestMessage body contains invalid characters

33003 — Invalid Phone Number

The to or from phone number is not in valid E.164 format. Phone numbers must start with + followed by the country code and subscriber number (e.g., +18005551234).

33005 — Missing Required Field

A required field in the request body is missing. Required fields depend on the endpoint:

EndpointRequired Fields
Send messageto, from, and body (when no mediaUrl is provided)
Send broadcastrecipients, from, and body (when no mediaUrl)

33006 — Invalid Message Type

The messageType field must be either SMS or MMS. This error is returned when an unsupported value is provided.

33016 — Invalid Message Content

The message body contains characters that are not supported for SMS transmission. The error response may include an additionalInfo field listing each invalid character and its 1-based position in the body.


Content Compliance Errors

CodeNameHTTP StatusMessage
33019NonCompliantMessageContent400 Bad RequestMessage content violates messaging compliance rules

33019 — Non-Compliant Message Content

The message body violates messaging compliance rules. All outbound messages are automatically screened against industry compliance standards, including but not limited to:

  • SHAFT content — Sex, Hate, Alcohol, Firearms, Tobacco
  • Phishing — Deceptive links or social engineering attempts
  • Fraud indicators — Scam patterns, impersonation, or misleading content
  • Regulated industries — Cannabis, gambling, lending (where applicable)

Review and modify the message body to comply with messaging guidelines before retrying.


Sender Number Errors

CodeNameHTTP StatusMessage
33008SenderNumberNotAvailable400 Bad RequestSender number is not available
33009SenderNumberNotActive400 Bad RequestSender number is not active

33008 — Sender Number Not Available

The from number is not provisioned or not currently available for sending. This may indicate the number has not been set up, has been released, or is temporarily unavailable.

33009 — Sender Number Not Active

The from number exists in the system but is not in an active state. Possible states include pending, suspended, or deactivated. Contact support to activate the number.


Idempotency Errors

CodeNameHTTP StatusMessage
33013DuplicateIdempotencyKey409 ConflictDuplicate idempotency key

33013 — Duplicate Idempotency Key

A message with the same idempotencyKey is currently being processed or a conflict was detected. When an idempotent request completes successfully and is retried, the original response is returned. This error is only returned when a conflict prevents the idempotent lookup from completing.

Tip: Use unique, descriptive idempotency keys (e.g., order-12345-shipment-notification) to safely retry requests without creating duplicate messages.


Media Errors (MMS)

CodeNameHTTP StatusMessage
33014MediaTooLarge413 Payload Too LargeMedia file too large
33015MediaTypeNotSupported400 Bad RequestMedia type not supported
33017MediaUploadFailed400 Bad RequestFailed to upload media
33018MediaUrlNotAllowed400 Bad RequestThe provided media URL is not allowed

33014 — Media Too Large

The media file referenced by mediaUrl exceeds the maximum allowed size of 1 MB (1,048,576 bytes). Reduce the file size or use a lower-resolution version before retrying.

33015 — Media Type Not Supported

The media file at the mediaUrl has a MIME type that is not supported. The following MIME types are accepted:

CategoryMIME TypeCommon Extensions
Imageimage/jpeg.jpg, .jpeg
Imageimage/png.png
Imageimage/gif.gif
Videovideo/mp4.mp4
Videovideo/mpeg.mpeg, .mpg
Audioaudio/mpeg.mp3
Documentapplication/pdf.pdf
Contacttext/vcard.vcf
Contacttext/x-vcard.vcf

33017 — Media Upload Failed

The media file at the provided mediaUrl could not be downloaded or processed. Common causes:

  • The URL is unreachable or returned an HTTP error
  • The server timed out while downloading the file
  • The file is corrupted or unreadable

Verify the URL is publicly accessible and returns a valid media file.

33018 — Media URL Not Allowed

The provided mediaUrl failed security validation. The URL may point to a disallowed host, a private/internal network address, or use a protocol that is not permitted.

Requirements for mediaUrl:

  • Must use http:// or https:// protocol
  • Must point to a publicly accessible resource
  • Must not resolve to a private or internal IP address

Rate Limit Response Headers

Every response from the API includes rate limit information in the following headers:

HeaderDescriptionExample
X-RateLimit-LimitMaximum number of requests allowed in the current window10
X-RateLimit-RemainingNumber of requests remaining in the current window9
X-RateLimit-ResetUnix timestamp (seconds) indicating when the current window resets1741700000
Retry-AfterSeconds until the next request is allowed (only on 429 responses)30

MMS Media Requirements

When sending MMS messages, the mediaUrl must point to a publicly accessible media file that meets the following requirements:

RequirementValue
Max file size1 MB (1,048,576 bytes)
Protocolhttp or https
AccessibilityMust be publicly accessible (no authentication required)
MIME typesimage/jpeg, image/png, image/gif, video/mp4, video/mpeg, audio/mpeg, application/pdf, text/vcard, text/x-vcard

If mediaUrl is provided without a body, the message is sent as MMS with media only. You may include both body and mediaUrl for an MMS with text and media.