A request ID is a unique identifier the API returns in a header on every response so that a specific call can be found in the provider's logs when you contact support.
Debugging an integration that spans two companies needs a shared handle. A request ID is that handle: a unique value the server generates for each HTTP exchange and returns in a response header, often named X-Request-Id by convention. Quote it to the provider's support team and they can find exactly what was received, when, and what was answered, without searching by timestamp through thousands of similar calls.
It helps to keep the identifiers apart. A request ID names one exchange. A resource ID, such as a message id, names the thing created, which can outlive many requests: a POST that times out and is retried with the same idempotency key produces two request IDs and one message. A correlation ID is yours, generated at the edge of your system and carried through every service a job touches; tracing standards such as W3C Trace Context formalise the same idea across services. Log all of them together, with the endpoint, the HTTP status and the time in UTC.
Example
A hypothetical order service receives a 500 at 14:02:11 UTC. Its log line holds the request ID from the response, the idempotency key, the endpoint and the status. The support ticket quotes the request ID and nothing more is needed: no screenshots, no pasted payloads full of phone numbers, and no API key exposed by accident.
Common mistakes
- Logging response headers only on success, when errors are where they are needed.
- Letting the HTTP client throw an exception before the headers are read.
- Confusing the request ID with the message id when asking about a delivery.
At SMSMeteor: every response carries X-Request-Id; quote it when you write to support, which answers conversations in the panel seven days a week. Identifiers are prefixed: msg_, bat_, evt_, cmp_. The reference field, up to 128 characters of your own, is echoed in responses and webhooks, which makes it a ready-made correlation ID, and replayed webhook events keep their original event id. See the API reference.
