Understanding HTTP Status Codes

When you send an API request to the server, the server returns a response along with the status codes. The status code helps you understand whether the request was successful or any error occurred.

The following are the most commonly used HTTP Status Codes along with their descriptions:

Status Code

Result

Description

200 OK

Success

The request was successful, and the server returned the expected response.

201 Created

Resource Created

The request was successful, and a new resource was created on the server.

204 No Content

Success (No Data)

The request was successful, but the server did not return any content.

400 Bad Request

Invalid Request

The server could not understand the request due to invalid syntax or missing information.

401 Unauthorized

Authentication Failed

Authentication is required or provided credentials are invalid.

403 Forbidden

Access Denied

The user does not have permission to access the requested resource.

404 Not Found

Resource Not Found

The requested resource or endpoint could not be found on the server.

405 Method Not Allowed

Invalid Method

The request HTTP method (GET, POST, etc.) is not supported for the requested resource.

408 Request Timeout

Timeout

The request took too long, and the server stopped waiting for a response.

409 Conflict

Request Conflict

The request could not be completed due to a conflict with the current server state.

415 Unsupported Media Type

Invalid Content Type

The server cannot process the request because of an unsupported format in the body or headers.

429 Too Many Requests

Rate Limit Exceeded

The client has sent too many requests in a short period of time.

500 Internal Server Error

Server Error

The server encountered an unexpected condition that prevented it from fulfilling the request.

502 Bad Gateway

Gateway Error

The server received an invalid response from another server while processing the request.

503 Service Unavailable

Server Unavailable

The server is currently unavailable due to maintenance or overload.

504 Gateway Timeout

Timeout

The server did not receive a timely response from another server.

Last updated

Was this helpful?