Skip to content

Error codes ​

Every error from the API has the same shape. error is a stable code you can branch on, docs links to its page here, and requestId identifies the request when you contact support.

json
{
  "statusCode": 402,
  "error": "insufficient_balance",
  "message": "Insufficient balance",
  "required": 300,
  "docs": "https://docs.msgine.net/errors/insufficient_balance",
  "requestId": "req_3kX9vQ2mHf7a"
}

Validation errors also carry details, one entry per problem. The SDKs expose all of these fields on their error type, see Errors and retries.

CodeStatusMeaning
validation_error400The request is invalid.
insufficient_balance402Your balance is too low for this request.
email_credits_exhausted402You do not have enough email credits for this send.
recipient_opted_out400Every recipient has opted out of messages from your account.
unauthorized401Authentication failed.
api_key_missing401No API key was sent.
api_key_invalid401The API key is wrong, revoked, or belongs to a suspended account.
signature_missing401This key requires signed requests, and the signature headers are missing.
signature_invalid401The request signature does not match.
signature_expired400The request timestamp is more than two minutes from MsGine’s clock.
signature_replayed400This signed request was already received.
forbidden403You are not allowed to do this.
ip_not_allowed403Requests with this API key are not allowed from your IP address.
scope_missing403The API key does not have the scope this endpoint needs.
not_found404Nothing with that id exists in your account.
conflict409The resource is not in a state that allows this.
rate_limit_exceeded429Too many requests.
trial_recipient_not_verified403On trial credit you can message only phone numbers you have verified.
country_not_allowed400Verifications to this country are not enabled for your account.
verification_expired410This verification has expired.
verification_closed409This verification is already approved, cancelled or failed.
verification_send_limit409This verification has been sent the maximum number of times.
verify_rate_limited429Too many verifications for this number or account right now.
internal_error500Something failed on MsGine’s side.
service_unavailable503A service MsGine depends on is not reachable right now.
http_error400The request failed.

Released under the MIT License.