Skip to content

4xx Client error

428 Precondition Required

The server requires a conditional request.

What 428 means

To prevent lost updates, the server insists on an If-Match header (with the resource's ETag) for changes.

Common causes

  • Updating without sending If-Match.

How to fix it

If you're calling an API

  • GET the resource, then send its ETag in If-Match with your update.

If you run the server

  • Document which endpoints require If-Match.

Should you retry?

With an If-Match header.

Example response

HTTP
HTTP/1.1 428 Precondition Required
Content-Type: application/problem+json

{
  "type": "about:blank",
  "title": "Precondition Required",
  "status": 428,
  "detail": "The server requires a conditional request."
}

Related headers: If-Match, ETag.

Defined in: RFC 6585. 428 is a client error: change the request before retrying.

Debugging an API call? Convert your request with the cURL converter, check the response with the JSON formatter, or see whether the API is down on its status page.

HTTP 428 FAQ

What does HTTP 428 mean?

428 Precondition Required: The server requires a conditional request. To prevent lost updates, the server insists on an If-Match header (with the resource's ETag) for changes.

Is 428 a client or server error?

It's a client error (4xx): something about the request needs to change before it can succeed.

How do I fix a 428 error?

GET the resource, then send its ETag in If-Match with your update.

Should I retry after a 428?

With an If-Match header.

Other 4xx status codes

All HTTP status codes