Common Patterns
Both API surfaces share the same response envelope and core vocabulary.
Response envelope
Successful responses:
Success
{
"success": true,
"requestId": "req_123",
"traceId": "trace_456",
"timestamp": "2026-04-07T10:00:00.000Z",
"data": {}
}Error responses:
Error
{
"success": false,
"requestId": "req_123",
"traceId": "trace_456",
"timestamp": "2026-04-07T10:00:00.000Z",
"error": {
"code": "VALIDATION_ERROR",
"message": "Request payload is invalid",
"details": []
}
}Envelope fields
| Field | Description |
|---|---|
requestId | Request correlation ID for support or logs |
traceId | Distributed tracing identifier when present |
timestamp | Server timestamp for the response |
data | Successful payload |
error.code | Machine-readable failure code |
error.details | Structured validation or protocol details |