The API uses conventional HTTP response codes. Error responses include a structured error object withDocumentation Index
Fetch the complete documentation index at: https://docs.politicalcomms.com/llms.txt
Use this file to discover all available pages before exploring further.
code, message, and statusCode fields.
Error response shape
HTTP status codes
| Status | Meaning |
|---|---|
200 | Success - Request completed successfully. |
400 | Bad Request - Invalid parameters or malformed request. |
401 | Unauthorized - Missing or invalid API key. |
403 | Forbidden - API key lacks required permissions or access denied. |
404 | Not Found - Resource does not exist. |
429 | Too Many Requests - Rate limit exceeded. See Rate Limits. |
500 | Internal Server Error - Something went wrong on our end. |
Common error codes
| Code | Description |
|---|---|
INVALID_API_KEY | API key is missing, malformed, or revoked. |
ORG_ACCESS_DENIED | Requested organization is not in your accessible hierarchy. |
PERMISSION_DENIED | API key lacks required permission scope. |
RATE_LIMIT_EXCEEDED | Too many requests - check the X-RateLimit-Reset header. |
RANGE_TOO_LARGE | Date range exceeds the maximum allowed (31 days). |
RANGE_TOO_OLD | Date range is too old (maximum 90 days). |
INVALID_DATE_FORMAT | Date parameter must be in YYYY-MM-DD format. |
Retrying safely
- All
GETendpoints are safe to retry - they have no side effects. - For
POSTandPATCH, retry only on429,500,502,503, and504responses. Don’t retry on400,401,403, or404- those indicate a problem with your request that won’t be fixed by trying again. - If you need stronger duplicate-write protection, send a unique
Idempotency-Keyheader on every write request. Retried calls with the same key return the cached response from the first call.
Reporting bugs
If you see a500 response or a code that’s not documented here, please email support@politicalcomms.com with:
- Your request method and path
- The full response body
- Any
X-Request-IDheader in the response (we use this to look up server-side logs) - Approximate timestamp (UTC is easiest)
