Skip to main content

Overview

Caspen uses conventional HTTP status codes to describe request outcomes:
  • Codes in the 2xx range indicate success.
  • Codes in the 4xx range indicate an issue with the request.
  • Codes in the 5xx range indicate a server-side problem.
HTTP status codes communicate the category of the problem, and the JSON body provides the platform-formatted message (with field-level errors when validation fails).

HTTP status codes

2xx - Success

CodeStatusDescription
200OKThe request succeeded
201CreatedA new resource was created
204No ContentThe operation succeeded and returns no body

4xx - Client errors

CodeStatusDescription
400Bad RequestThe request cannot be processed (generic client error)
401UnauthorizedMissing or invalid bearer token
403ForbiddenAuthenticated but not allowed to perform this action
404Not FoundThe requested resource does not exist
409ConflictThe request conflicts with the current resource state
422Unprocessable EntityValidation failed; see the errors object for details
429Too Many RequestsRate limit exceeded

5xx - Server errors

CodeStatusDescription
500Internal Server ErrorAn unexpected error occurred
502Bad GatewayUpstream dependency returned an invalid response
503Service UnavailableThe service is temporarily unavailable