Skip to content

Instantly share code, notes, and snippets.

@rcmaples
Last active December 24, 2018 15:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rcmaples/65e21e39a2d1103e4326ace2d368b8b0 to your computer and use it in GitHub Desktop.
Save rcmaples/65e21e39a2d1103e4326ace2d368b8b0 to your computer and use it in GitHub Desktop.
Common HTTP status codes for APIs

Common HTTP Status Codes for APIs

✅ 2xx Success

  • 200 OK
  • 201 Created
  • 202 Accepted
  • 203 Non-Authoritative Information
  • 204 No Content

🔄 3xx Redirection

  • 301 Moved Permanently

❌ 4xx Client Error

  • 400 Bad Request
  • 401 Unauthorized
  • 403 Forbiden
  • 404 Not Found
  • 405 Method Not Allowed
  • 414 Request-URI Too Long
  • 415 Unsupported Media Type
  • 418 I'm a teapot (RFC 2324)
  • 420 Enhance Your Calm(Twitter)
  • 422 Unprocessable Entity (WebDAV)
  • 423 Locked (WebDAV)
  • 426 Upgrade Required
  • 429 Too Many Requests
  • 431 Request Header Fields Too Large

👾 5xx Server Error

  • 500 Internal Server Error
  • 502 Bad Gateway
  • 503 Service Unavailable
  • 504 Gateway Timeout
  • 509 Bandwidth Limit Exceeded (Apache)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment