Request IDs & Debugging
Every neuroflash API response includes headers that help you trace and debug requests.
The x-request-id Header
Every API response includes an x-request-id header containing a UUID v4 that uniquely identifies the request:
x-request-id: 3f2504e0-4f89-11d3-9a0c-0305e82c3301
Always include this ID when contacting support — it allows the team to locate your exact request in the system logs and diagnose issues quickly.
Capturing the Request ID
- cURL
- Python
- Node.js
- Go
Use the -v (verbose) flag to see response headers:
curl -v https://app.neuroflash.com/api/digital-twin-service/v1/static-groups \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Look for the x-request-id line in the output:
< x-request-id: 3f2504e0-4f89-11d3-9a0c-0305e82c3301
import requests
response = requests.get(
"https://app.neuroflash.com/api/digital-twin-service/v1/static-groups",
headers={"Authorization": f"Bearer {token}"},
)
request_id = response.headers.get("x-request-id")
print(f"Request ID: {request_id}")
if not response.ok:
print(f"Error {response.status_code}: {response.text}")
print(f"Include this request ID in your support ticket: {request_id}")
const response = await fetch(
"https://app.neuroflash.com/api/digital-twin-service/v1/static-groups",
{
headers: { Authorization: `Bearer ${access_token}` },
}
);
const requestId = response.headers.get("x-request-id");
console.log(`Request ID: ${requestId}`);
if (!response.ok) {
console.error(`Error ${response.status}: ${await response.text()}`);
console.error(`Include this request ID in your support ticket: ${requestId}`);
}
req, _ := http.NewRequest("GET",
"https://app.neuroflash.com/api/digital-twin-service/v1/static-groups", nil)
req.Header.Set("Authorization", "Bearer "+token)
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
requestID := resp.Header.Get("x-request-id")
fmt.Printf("Request ID: %s\n", requestID)
if resp.StatusCode >= 400 {
body, _ := io.ReadAll(resp.Body)
fmt.Printf("Error %d: %s\n", resp.StatusCode, body)
fmt.Printf("Include this request ID in your support ticket: %s\n", requestID)
}
Log the x-request-id for every API call in production. When something goes wrong, you'll already have the information needed to get quick support.
The x-cloud-trace-context Header
Responses may also include an x-cloud-trace-context header:
x-cloud-trace-context: 105445aa7843bc8bf206b12000100000/1;o=1
This is an infrastructure-level trace ID used internally. You don't need to use it directly, but you can include it alongside the x-request-id when reporting issues for additional diagnostic context.