Skip to content

Standard Response Codes

This page documents the standard HTTP response codes used throughout our APIs. Understanding these codes is essential for interpreting API responses and debugging potential issues.

2xx Success

These codes indicate that the request was successful.

  • 200 OK:
    • The request was successful. The response body contains the requested data.
    • Example: Retrieving a list of resources or fetching a single resource.
  • 201 Created:
    • The request was successful, and a new resource was created.
    • Example: Creating a new user or posting a new item.
  • 204 No Content:
    • The request was successful, but there is no content to return in the response body.
    • Example: Deleting a resource successfully.

4xx Client Errors

These codes indicate that the request contained an error on the client side.

  • 400 Bad Request:
    • The request could not be understood or processed due to invalid syntax or parameters.
    • Example: Missing required fields, invalid data format, or incorrect request headers.
  • 401 Unauthorized:
    • The request requires authentication. The client must provide valid credentials.
    • Example: Attempting to access a protected resource without a valid access token.
  • 403 Forbidden:
    • The client does not have permission to access the requested resource.
    • Example: Accessing a resource that requires a specific role or authorization.
  • 404 Not Found:
    • The requested resource could not be found.
    • Example: Attempting to retrieve a non-existent resource.
  • 405 Method Not Allowed:
    • The HTTP method used is not supported for this resource.
    • Example: Using a POST request on a read only endpoint.
  • 409 Conflict:
    • The request could not be completed due to a conflict with the current state of the target resource.
    • Example: Attempting to create a resource that already exists.
  • 429 Too Many Requests:
    • The client has sent too many requests in a given amount of time. Rate limiting has been applied.
    • Example: Exceeding the API's rate limit.

5xx Server Errors

These codes indicate that the server encountered an error while processing the request.

  • 500 Internal Server Error:
    • The server encountered an unexpected error and could not complete the request.
    • Example: A server-side exception or database error.
  • 501 Not Implemented:
    • The server does not support the functionality required to fulfill the request.
    • Example: An API endpoint that is not yet implemented.
  • 503 Service Unavailable:
    • The server is temporarily unavailable due to maintenance or overload.
    • Example: The API is undergoing scheduled maintenance or experiencing high traffic.

Additional Notes

  • When an error occurs, the response body will typically contain a JSON object with details about the error, such as an error message and code.
  • Always check the response body for more detailed error information.
  • The API may return additional custom error codes specific to certain endpoints. Refer to the endpoint documentation for details.