Error Codes
All errors return a JSON object with an error message and links to documentation.
Error Response
{
"error": "Invalid API key",
"code": "UNAUTHORIZED",
"docs": "https://docs.divct.workers.dev",
"dashboard": "https://www.divct.workers.dev"
}
Full List
| Status | Code | Description |
|---|---|---|
| 400 | INVALID_TYPE | Unknown chart type |
| 400 | INVALID_DATA | Malformed or unsupported input. Examples: data2 to data5 on pie or donut, an invalid legend value (use true or false), more names than groups, a name over 60 characters, groups of different lengths on bar or stacked-bar, radar without 3 labels or with a group that does not have one value per label. Nothing is charged when this error is returned. |
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 403 | DOMAIN_NOT_ALLOWED | API key restricted to specific domains |
| 403 | INVALID_SIGNATURE | Request signature verification failed |
| 403 | FORBIDDEN | Request blocked (e.g., restricted key usage) |
| 403 | ACCOUNT_SUSPENDED | Account has been suspended |
| 404 | NOT_FOUND | Resource not found |
| 429 | RATE_LIMITED | Too many requests |
| 429 | QUOTA_EXCEEDED | Points quota exhausted (includes Retry-After header) |
| 500 | INTERNAL_ERROR | Internal server error. If points were already deducted for the request (for example a failed save), they are returned automatically. This applies to failures from 25 Nov 2026; earlier usage is not adjusted. |
| 503 | SERVICE_UNAVAILABLE | Chart generation service down |