All error codes
premium_number_locked
HTTP 422Not retryableThis number is in a cooldown period from a recent operation and cannot be rotated until the lock expires.
How to resolve
- The number is in a cooldown period after a recent rotation.
- Check `rotation.locked_until` on GET /premium-numbers/{id} and retry after that time.
Example response
JSON
{
"object": "error",
"code": "premium_number_locked",
"message": "This number is in a cooldown period from a recent operation and cannot be rotated until the lock expires.",
"request_id": "req_example123",
"docs_url": "https://docs.statxt.com/api/errors/premium_number_locked",
"retryable": false,
"recommended_action": "Wait until rotation.locked_until, then retry."
}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 === "premium_number_locked") {
// This number is in a cooldown period from a recent operation and cannot be rotated until the lock expires.
console.error(err.requestId) // include in support tickets
}
}Public reference: /docs/errors/premium_number_locked