All error codes

insufficient_credits

HTTP 422Not retryable

Credit balance is too low to cover this send. Top up before retrying.

How to resolve

  • Top up your credit balance in the dashboard.
  • Set up auto-recharge to prevent interruptions at scale.

Example response

JSON

{
  "object": "error",
  "code": "insufficient_credits",
  "message": "Credit balance is too low to cover this send. Top up before retrying.",
  "request_id": "req_example123",
  "docs_url": "https://docs.statxt.com/api/errors/insufficient_credits"
}

SDK handling

TypeScript

import { StatxtClient, StatxtApiError } from "@statxt/sdk"

const client = new StatxtClient({ apiKey: process.env.STATXT_API_KEY! })

try {
  await client.messages.send({ ... })
} catch (err) {
  if (err instanceof StatxtApiError && err.code === "insufficient_credits") {
    // Credit balance is too low to cover this send. Top up before retrying.
    console.error(err.requestId) // include in support tickets
  }
}

Public reference: /docs/errors/insufficient_credits