HTTP Status Code Guide

This document outlines the standard HTTP status codes used by our API to indicate the success or failure of a request.

2xx: Success

These codes indicate that the client's request was successfully received, understood, and accepted.

CodeStatusDescriptionDev Action
200OKStandard response for successful requests.Handle the response body data.
201CreatedThe request has been fulfilled and a new resource has been created.Check the Location header or body for the new ID.
202AcceptedRequest accepted for processing, but processing is not complete.Poll for status updates if applicable.
204No ContentRequest succeeded, but there is no content to send back.Don't expect a response body (often used for DELETE).

3xx: Redirection

These codes indicate that further action needs to be taken by the user agent in order to fulfill the request.

Code

Status

Description

Dev Action

302

Found

The requested resource resides temporarily under a different URL. Used heavily for 3D Secure flows, OAuth callbacks, and hosted checkout navigation.

  • Browser: Follows automatically.
  • API/Server: Read the Location header and redirect the user there.

4xx: Client Errors

These codes indicate that the client seems to have erred (e.g., malformed syntax, invalid parameters).

CodeStatusDescriptionDev Action
400Bad RequestThe server cannot process the request due to a client error (e.g., invalid JSON).Validate your payload/parameters against the schema.
401UnauthorizedAuthentication is required and has failed or has not been provided.Check your Bearer token or API key.
403ForbiddenThe server understood the request but refuses to authorize it.Check user permissions/scopes.
404Not FoundThe requested resource could not be found.Verify the URL path and ID.
409ConflictRequest conflicts with the current state of the server.Often happens on duplicate entries (e.g., double sign-up).
418I'm a TeapotThe server refuses the attempt to brew coffee with a teapot.Used for custom exceptions.
422Unprocessable EntitySemantic errors in the request (e.g., password too short).Check validation error messages in the body.
429Too Many RequestsThe user has sent too many requests in a given amount of time.Implement exponential backoff.

5xx: Server Errors

These codes indicate that the server failed to fulfill an apparently valid request.

CodeStatusDescriptionDev Action
500Internal Server ErrorA generic error message when an unexpected condition was encountered.Check server logs/Sentry for stack traces.
502Bad GatewayThe server received an invalid response from the upstream server.Check if the DB or internal microservices are down.
503Service UnavailableThe server is currently unable to handle the request (overloaded/maintenance).Retry the request later.
504Gateway TimeoutThe upstream server failed to send a request in time.Optimize query performance or check network latency.