Skip to main content
Railmail uses conventional HTTP status codes to indicate the outcome of a request. Codes in the 2xx range mean success, 4xx means the request failed given the information provided, and 5xx means something went wrong on Railmail’s side.

Error format

All errors use RFC 7807 application/problem+json. The body always includes type, title and status, and may include more:
{
  "type": "https://api.railmail.app/problems/validation-error",
  "title": "Validation failed",
  "status": 400,
  "detail": "One or more fields are invalid.",
  "instance": "/api/v1/subscribers",
  "timestamp": "2026-07-01T10:15:30Z",
  "errors": {
    "email": "must be a valid email address"
  }
}
FieldDescription
typeA URI identifying the problem type.
titleA short, human-readable summary of the problem.
statusThe HTTP status code, repeated for convenience.
detailA human-readable explanation specific to this occurrence.
instanceA URI reference for the specific request that failed.
timestampWhen the error occurred (ISO 8601).
errorsPresent on validation failures — a map of field name to message.

Common status codes

StatusMeaningWhat to do
400Bad requestFix the request body or parameters. Check the errors map for field-level detail.
401UnauthorizedThe API key is missing or invalid. See Authentication.
403ForbiddenThe key is valid but lacks the required scope for this operation.
404Not foundThe resource doesn’t exist in this project.
409ConflictThe request conflicts with the current state (for example, a duplicate).
422UnprocessableThe request is well-formed but semantically invalid.
429Too many requestsYou’ve hit the rate limit. See Rate limits.
5xxServer errorRetry with backoff. If it persists, contact support.
Always read the title and detail fields — they explain what went wrong far better than the status code alone. For 400 responses, the errors map pinpoints exactly which fields to fix.