Skip to content

Handle synchronous callbacks ​

A synchronous callback requires the receiver to return a structured result within one HTTPS request. Configure it separately from asynchronous events. Selecting a long connection for events does not change synchronous callback transport.

You can configure token.agent.action.v1 and send synthetic Sandbox tests. Actual TOKEN business calls are not available yet. Saved configuration or a successful test does not prove production use.

Configure and test ​

  1. Select the callback type under the current Sandbox Application → Developer integration → Events and webhooks → Callback configuration.
  2. Configure a public HTTPS receiver, complete endpoint verification, and prepare signature validation, Verification Token and decryption according to current settings.
  3. Save, send one synthetic test and inspect the separate callback result and receiver records.

If saving fails, follow configuration recovery. Recover configuration separately from checking an already sent test; recovery does not automatically send another test.

Asynchronous event and synchronous callback sets are saved independently; preserve the other complete set when changing one. A changed URL requires verification again. A test may execute receiver logic, so use an isolated test handler. Test requests carry X-GV-Test-Delivery: true.

Receive the request ​

Validate the signature, token and encrypted body according to current configuration, then validate the request Schema, Application and environment. After removing transport security fields, the envelope looks like this; all identifiers are synthetic.

json
{
  "schema_version": "1",
  "request_id": "callback-example-001",
  "callback_type": "token.agent.action.v1",
  "application_id": "application_opaque",
  "environment": "sandbox",
  "data": {"action": "check"}
}
FieldTypeRequiredDescription
schema_versionstring🔴 RequiredCurrently "1"
request_idstring🔴 RequiredEcho unchanged; prevent duplicate effects
callback_typestring🔴 Requiredtoken.agent.action.v1
application_id, environmentstring🔴 RequiredMatch the receiver Application and environment
dataobject🔴 RequiredApplication-defined JSON, at most 64 KiB

Do not replace the request identifier with an asynchronous event_id or lease ACK. See Receive webhooks for signature, encryption and credential retrieval.

Return a result ​

Return application/json within five seconds. The entire response must not exceed 64 KiB. Its envelope contains exactly these five fields; duplicate fields, unknown fields, a mismatched request identifier or a non-object result are rejected.

json
{
  "schema_version": "1",
  "request_id": "callback-example-001",
  "callback_type": "token.agent.action.v1",
  "status": "completed",
  "result": {"accepted": true}
}
FieldTypeRequiredDescription
schema_versionstring🔴 RequiredExactly "1"
request_idstring🔴 RequiredMust exactly match the request
callback_typestring🔴 RequiredMust exactly match the request
statusstring🔴 Requiredcompleted or rejected
resultobject🔴 RequiredApplication-defined JSON object

A 2xx response without a valid result does not complete the callback.

Timeouts and unknown results ​

Each request identifier is attempted once. The platform never automatically retries an external effect. A timeout, disconnect or 503 can mean that processing occurred but its result was lost. Reconcile the original request_id with your receiver rather than retrying with a new identifier.

Submitting the same request identifier returns 409 without executing the effect again. Use a new identifier only after reconciliation and an explicit decision to start a new test. The receiver must still prevent duplicate business effects.

SituationAction
Receiver URL changed or verification failedVerify the actual receiver for the current Application before saving
Signature, token or decryption failedReject the request, check current credentials and preserve safe diagnostics
Result fields, types or identifiers do not matchCorrect the response and reconcile the original request identifier
Timeout, disconnect or 503Reconcile the original result before explicitly starting another test
409, request identifier already usedRead the original result; explicitly create a new identifier only for a new test

Next: Receive events over a long connection · Event catalog · Support and diagnostics

The X-GV-Callback-ID header matches the request identifier. Do not log the signature, token, encrypted body or full business payload.

Developer documentation. Internal operations access is not required.