6. Asynchronous operations
6.1 Negotiation
Section titled “6.1 Negotiation”HTTP_ASYNC_PREFER MUST
A Client that prefers asynchronous processing (Async ASYNC_CLIENT_PREFER) MUST send Prefer: respond-async (RFC 7240).
HTTP_ASYNC_EXPECT MUST
A Client that requires asynchronous processing (Async ASYNC_CLIENT_REQUIRE) MUST send Expect: 202-accepted.
HTTP_ASYNC_417 MUST
When the negotiation fails (Async ASYNC_SERVER_MATRIX), the Server MUST respond 417 Expectation Failed with the NEGOTIATION code.
6.2 Accepting an operation
Section titled “6.2 Accepting an operation”HTTP_ASYNC_202 MUST
When the Server runs an operation asynchronously, it MUST respond 202 Accepted, with the Operation ID in the Operation-ID header field and the URL of the operation state in the Location header field.
HTTP_ASYNC_OPERATIONS_PATH SHOULD
When the operation state is served by the same API, its URL SHOULD be /@operations/:operationId, relative to the base URL of the API. Servers MAY use any other URL, including on another host.
6.3 Operation state
Section titled “6.3 Operation state”HTTP_ASYNC_POLL_425 MUST
While the operation is pending, GET on the operation URL MUST respond 425 Too Early, with the state (status: "pending") and, when known, the progress in the body, and SHOULD include Retry-After.
HTTP_ASYNC_POLL_DONE MUST
When the operation has completed, GET on the operation URL MUST respond with the status code, header fields and body that the synchronous response would have had, for both success and failure (Async ASYNC_POLL_SUCCESS and ASYNC_POLL_FAILURE).
6.4 Progress stream
Section titled “6.4 Progress stream”HTTP_ASYNC_SSE MAY
Servers MAY stream the state of an operation as Server-Sent Events when the Client requests the operation URL with Accept: text/event-stream: progress events carry the progress, and a final done event carries the completed state, after which the stream ends.
6.5 Callbacks
Section titled “6.5 Callbacks”HTTP_ASYNC_CALLBACK_HEADERS MAY
The callback URLs (Async ASYNC_CALLBACK_URL and ASYNC_CALLBACK_ERROR_URL) MAY be sent in the Callback and Callback-Error request header fields. The Location of the operation state MUST be sent even when callbacks are requested (Async ASYNC_CALLBACK_POLL_FALLBACK).
HTTP_ASYNC_STANDARD_WEBHOOKS MUST
Callbacks MUST be POST requests that conform to Standard Webhooks 1.0: the webhook-id header field MUST be the Operation ID, and the webhook-timestamp and webhook-signature header fields MUST be sent and computed as that specification defines. Servers SHOULD prefer the asymmetric signature scheme (v1a, Ed25519) and MUST document how Clients obtain the verification keys.
HTTP_ASYNC_CALLBACK_PAYLOAD MUST
The callback body MUST be a JSON object with type (crud.operation.succeeded or crud.operation.failed), timestamp (ISO 8601, when the operation completed) and data, an object with the operationId and the completed state: the status code, the relevant headers and the body of the response that the operation URL returns.
When the body exceeds the size the Server accepts for callbacks, the Server MAY omit data.body and set data.truncated to true; the Client then retrieves the state from the operation URL.
HTTP_ASYNC_CALLBACK_RETRIES SHOULD
Servers SHOULD retry failed deliveries as recommended by Standard Webhooks: only 2xx responses are successful, retries use exponential backoff with jitter, 410 Gone stops deliveries to that URL, and Retry-After is honored.
Source: lingodata/crud@bc225ba · specs/http/sections/06-async.md · http 0.2.0 (draft)
LingoData specifications, reference implementations and this site are licensed under the Apache License 2.0. Copyright 2026 Gustavo Gondim.