Brandymail Docs

Errors

Common HTTP and JSON-RPC error shapes.

Errors

REST

Error responses typically look like:

{
  "error": "Unauthorized"
}
StatusMeaning
400Validation failed (missing/invalid domain, body, etc.)
401Missing/invalid API key or internal auth
404Unknown route or resource
429Rate limited — back off and retry
5xxUnexpected server error

MCP (JSON-RPC)

MCP errors use JSON-RPC envelopes, for example:

{
  "jsonrpc": "2.0",
  "error": { "code": -32001, "message": "Unauthorized" },
  "id": null
}

Method-not-allowed (GET/DELETE on /mcp) returns 405 with Allow: POST.

On this page