MCP Template
REST API

Errors

Error format and status codes

Error Format

All errors return a JSON object:

{ "detail": "Error message describing what went wrong" }

Status Codes

CodeMeaningWhat to do
400Invalid inputCheck your request body matches the expected schema
401Missing or invalid API keyVerify your Authorization: Bearer header
402Quota exceededWait for daily reset (check Retry-After header) or upgrade your plan
403Insufficient permissionsYour API key lacks the required scope for this endpoint
404Not foundCheck the endpoint URL or resource ID
429Rate limitedWait and retry (check Retry-After header)
500Server errorRetry the request; if persistent, check the health endpoint

Example Error Responses

Invalid input (400):

curl -X POST http://localhost:8000/api/v1/services/config_get \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{}'
{ "detail": [{ "msg": "Field required", "type": "missing", "loc": ["body", "key"] }] }

Missing authentication (401):

curl http://localhost:8000/api/v1/auth/me
{ "detail": "Not authenticated" }

Insufficient scope (403):

{ "detail": "Insufficient permissions for this operation." }

Quota exceeded (402):

{ "detail": "Daily request limit exceeded (100/100). Resets in 14h 23m." }

On this page