All error codes
inventory_unavailable
HTTP 422RetryableNo available numbers were found in the requested area code. Try a different area code.
How to resolve
- No numbers were available in the requested area code.
- Retry with a different `area_code` on POST /premium-numbers or POST /premium-numbers/{id}/rotate.
Example response
JSON
{
"object": "error",
"code": "inventory_unavailable",
"message": "No available numbers were found in the requested area code. Try a different area code.",
"request_id": "req_example123",
"docs_url": "https://docs.statxt.com/api/errors/inventory_unavailable",
"retryable": true,
"recommended_action": "Retry with a different area_code."
}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 === "inventory_unavailable") {
// No available numbers were found in the requested area code. Try a different area code.
console.error(err.requestId) // include in support tickets
}
}Public reference: /docs/errors/inventory_unavailable