Error Reference
Error Format
Every error includes three tiers:
{
"error": {
"type": "invalid_date_range",
"message": "start_date must be before end_date",
"display_message": "The date range is invalid.",
"suggestion": "Swap: start_date=2026-03-10&end_date=2026-03-17",
"param": "start_date",
"docs_url": "https://suna.health/docs/api/errors"
}
}
| Field | For |
|---|
message | Developers — debug context |
display_message | End users — safe to show in UI |
suggestion | AI agents — machine-actionable fix |
Error Types
| HTTP | Type | When |
|---|
| 400 | invalid_request | Bad params, missing fields |
| 400 | invalid_date_range | start > end |
| 401 | unauthorized | Missing/invalid API key |
| 401 | key_revoked | Revoked key |
| 403 | insufficient_scope | Missing scope |
| 404 | not_found | Resource doesn't exist |
| 429 | rate_limited | Over limit (Retry-After header) |
| 500 | internal_error | Server error |
| 503 | not_available | Placeholder endpoint |