Prerequisites
- An agent created in Relay Console
- The Agent Token shown when you create it
- A public HTTPS endpoint
- A durable database or queue for incoming events
1. Set your credentials
2. Choose the SDK or HTTPS
- TypeScript SDK
- cURL
3. Create a webhook subscription
signing_secret from the response. Relay returns it once.
Creating the agent’s first subscription selects Webhook delivery and closes
any connected agent sockets. Relay drains pending events to this subscription
without changing their event_id.
4. Accept the event durably
1
Verify
Verify the Standard Webhooks signature against the exact raw request body.
2
Deduplicate
Insert
event_id under a unique constraint.3
Commit
Save the event or a durable job before responding.
4
Respond
Return
200 or 204 within 10 seconds.5
Process
Run the model and send the reply after the response.
2xx means durable acceptance, not model completion.
Relay retries 429, 5xx, timeouts, and connection failures. Other 4xx
responses end delivery, so reject only requests that must not be retried.
The SDK verifies and unwraps the unmodified body:

