# API Errors

> HTTP status codes and error payload format returned by the XBeast Public API.

Source: https://xbeast.io/docs/api-errors

Errors use a consistent JSON body. Successful responses return the resource directly (or a wrapper like `{ "accounts": [...] }`).

## Error body

```json
{
  "error": {
    "code": "validation_error",
    "message": "scheduled_at must be in the future"
  }
}
```

## Codes

| HTTP | code | When |
| --- | --- | --- |
| 401 | unauthorized | Missing, invalid, or revoked API key. |
| 403 | forbidden | Free plan, posting disabled on the account, or updating/deleting a posted post. |
| 404 | not_found | Account or post does not exist (or is not yours / not API-created). |
| 422 | validation_error | Invalid JSON, past scheduled_at, bad media, or invalid auto-retweet hours. |
| 422 | rate_limit_exceeded | Daily post cap reached for that account (7 scheduled + posted posts that day). |
| 422 | insufficient_credits | Not enough credits to publish (1 per post, plus 8 if the post contains a URL). |
| 500 | post_failed | Publish-now succeeded locally but the social network did not return a post id. |
| 500 | internal_error | Unexpected server error. |
