Skip to main content
HomeTools

HTTP Status Code Reference

Free

Interactive HTTP status code reference. Search by code or description, filter by category (1xx–5xx), get meaning, common causes, and ready-to-use assertion snippets for Playwright, RestAssured, and pytest.

#http#status-code#api-testing#rest#assertions
Showing 27 status codes
100Continue
Informational

Server received headers, client should send body.

Common Causes
  • Large file uploads
  • Expect: 100-continue header
Assertion Tip
Rarely asserted directly. Check if client proceeds with body.
101Switching Protocols
Informational

Server switching to protocol requested via Upgrade header.

Common Causes
  • WebSocket upgrade
Assertion Tip
Assert 101 when testing WebSocket connections.
102Processing
Informational

Server received and is processing, but no response yet.

Common Causes
  • Long-running WebDAV operations
Assertion Tip
Used in WebDAV. Rarely tested in REST APIs.
200OK
Success

Request succeeded. Standard response for successful requests.

Common Causes
  • GET/PUT/PATCH successful
Assertion Tip
expect(response.status).toBe(200)
201Created
Success

Request succeeded and a new resource was created.

Common Causes
  • POST creating a resource
Assertion Tip
Assert 201 on POST. Check Location header for new resource URL.
202Accepted
Success

Request accepted for processing, but not completed yet.

Common Causes
  • Async job queued
  • Webhook accepted
Assertion Tip
Assert 202 for async operations. Poll for completion.
204No Content
Success

Request succeeded, but no response body.

Common Causes
  • DELETE successful
  • PUT with no return body
Assertion Tip
Assert 204 on DELETE. Verify body is empty.
206Partial Content
Success

Server returning partial resource due to Range header.

Common Causes
  • Video streaming
  • Large file download resume
Assertion Tip
Assert Content-Range header is present.
301Moved Permanently
Redirect

Resource permanently moved to new URL.

Common Causes
  • URL restructuring
  • HTTP→HTTPS redirect
Assertion Tip
Assert Location header. Test that clients follow redirect.
302Found
Redirect

Resource temporarily at different URL.

Common Causes
  • Login redirect
  • Temporary maintenance page
Assertion Tip
Assert Location header. Common after form submissions.
304Not Modified
Redirect

Cached version is still valid. No body returned.

Common Causes
  • Conditional GET with If-None-Match/If-Modified-Since
Assertion Tip
Assert 304 with ETag/Last-Modified headers in caching tests.
307Temporary Redirect
Redirect

Like 302, but method and body must not change.

Common Causes
  • HTTPS redirect preserving POST method
Assertion Tip
Assert original method is preserved after redirect.
308Permanent Redirect
Redirect

Like 301, but method and body must not change.

Common Causes
  • Permanent URL change preserving POST
Assertion Tip
Assert method preservation. Test with non-GET methods.
400Bad Request
Client

Server cannot process due to client error (malformed syntax).

Common Causes
  • Invalid JSON body
  • Missing required field
  • Wrong data type
Assertion Tip
Assert 400 for validation tests. Check error message in body.
401Unauthorized
Client

Authentication required or credentials invalid.

Common Causes
  • Missing auth token
  • Expired JWT
  • Invalid API key
Assertion Tip
Assert 401 without credentials. Test expired token handling.
403Forbidden
Client

Server understood request but refuses to authorize it.

Common Causes
  • Insufficient permissions
  • IP blocked
  • CORS denied
Assertion Tip
Assert 403 for role-based access control tests.
404Not Found
Client

Server cannot find the requested resource.

Common Causes
  • Wrong URL
  • Deleted resource
  • Typo in endpoint
Assertion Tip
Assert 404 for deleted resources and invalid endpoints.
405Method Not Allowed
Client

HTTP method not supported for this endpoint.

Common Causes
  • PUT on read-only endpoint
  • DELETE not allowed
Assertion Tip
Assert 405 when sending wrong HTTP method.
409Conflict
Client

Request conflicts with current server state.

Common Causes
  • Duplicate entry
  • Concurrent update conflict
Assertion Tip
Assert 409 for duplicate creation or optimistic locking.
413Payload Too Large
Client

Request body exceeds server limits.

Common Causes
  • File upload too large
  • Body size limit reached
Assertion Tip
Assert 413 with oversized payloads in boundary tests.
415Unsupported Media Type
Client

Content-Type not supported by the endpoint.

Common Causes
  • Sending XML to JSON-only endpoint
  • Missing Content-Type header
Assertion Tip
Assert 415 with wrong Content-Type header.
422Unprocessable Entity
Client

Request well-formed but semantically invalid.

Common Causes
  • Business rule violation
  • Invalid field value
Assertion Tip
Assert 422 for semantic validation. Popular in REST APIs.
429Too Many Requests
Client

Rate limit exceeded.

Common Causes
  • API rate limiting
  • DDoS protection
Assertion Tip
Assert 429 in rate limit tests. Check Retry-After header.
500Internal Server Error
Server

Unexpected server error.

Common Causes
  • Unhandled exception
  • Database down
  • Bug in server code
Assertion Tip
Should NOT appear in happy-path tests. Log and investigate.
502Bad Gateway
Server

Server got invalid response from upstream.

Common Causes
  • Upstream service down
  • Proxy misconfiguration
Assertion Tip
Assert 502 in service mesh / gateway tests.
503Service Unavailable
Server

Server temporarily unable to handle requests.

Common Causes
  • Maintenance mode
  • Server overloaded
Assertion Tip
Assert 503 during maintenance window tests.
504Gateway Timeout
Server

Server didn't get response from upstream in time.

Common Causes
  • Slow upstream service
  • Network timeout
Assertion Tip
Assert 504 in timeout and resilience tests.
Frequently Asked Questions(click to expand)

What is the difference between 401 and 403?

401 (Unauthorized) means the client has not provided valid authentication credentials. 403 (Forbidden) means the client is authenticated but does not have permission to access the resource.

When should I use 200 vs 201 vs 204?

Use 200 for successful GET/PUT/PATCH requests that return data. Use 201 for POST requests that create a new resource. Use 204 for DELETE or actions that succeed but return no body.