Skip to content

Error handling

Bearer routes share one envelope. Session-only key routes do not. Quote request_id when you write in.

01Envelope

400Envelope
{
  "success": false,
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable error description"
  },
  "meta": {
    "request_id": "req_abc123def456",
    "timestamp": "2026-02-01T12:00:00Z"
  }
}

02Codes

StatusCodeWhen
400VALIDATION_ERRORMissing project_id, short topic, unknown platform
400NO_PROJECTNo project on the account, or none passed
401UNAUTHORIZEDNo Bearer, bad key, expired key
402INSUFFICIENT_CREDITSWallet cannot cover the job
403FORBIDDENMissing write, wrong scope, or consent required
404NOT_FOUNDWrong id, or not yours
409CONFLICTAlready published
412PRECONDITION_FAILEDStill generating, or no connected channel
429RATE_LIMIT_EXCEEDEDSleep Retry-After
500INTERNAL_ERRORRetry with backoff. Quote the id.

03Examples

400 Validation

400VALIDATION_ERROR
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "topic: String must contain at least 3 character(s), project_id: Required"
  },
  "meta": {
    "request_id": "req_abc123",
    "timestamp": "2026-02-01T12:00:00Z"
  }
}

402 Credits

402INSUFFICIENT_CREDITS
{
  "success": false,
  "error": {
    "code": "INSUFFICIENT_CREDITS",
    "message": "This operation requires 2.4 credits but your balance is 1.2"
  },
  "meta": {
    "request_id": "req_ghi789",
    "timestamp": "2026-02-01T12:00:00Z"
  }
}

412 Not ready

412PRECONDITION_FAILED
{
  "success": false,
  "error": {
    "code": "PRECONDITION_FAILED",
    "message": "Content is still generating. Poll /api/v1/social/content/{id} until status is ready."
  },
  "meta": {
    "request_id": "req_pqr678",
    "timestamp": "2026-02-01T12:00:00Z"
  }
}

Session key routes return { "error": "…" } with no envelope. See /docs/api-reference/api-keys.