HTTPREF
← Back to headers

HTTP Header

X-Request-Id

Networking

Carries a unique identifier for a request so it can be traced across systems.

HTTP header reference, syntax, examples, and developer usage.

What is the X-Request-Id header?

The X-Request-Id HTTP header is used to transmit metadata between a client and server as part of HTTP requests or responses.

HTTP headers define how content should be interpreted, cached, authenticated, secured, or processed by browsers and APIs.

Direction

This header may appear in both HTTP requests and responses.

Syntax

X-Request-Id: unique-id

Example

X-Request-Id: 6f8a9c12-1234-5678-90ab-cdef12345678

Common use cases

  • Request tracing
  • Debugging distributed systems
  • Correlating logs

Common mistakes

  • Using the header in the wrong request or response context
  • Sending invalid header values
  • Incorrect header syntax
  • Assuming the header automatically changes server behaviour

Related headers