Skip to main content
Send an agent’s events to your HTTPS endpoint in three steps: create a subscription, store its signing secret, and check the delivery path.

Before you start

Create a subscription

Send the receiver’s public HTTPS URL and the event names you want. Relay delivers each event to every active subscription that includes its type, so one subscription per receiver is enough:

Store the signing secret

The create response is the only place Relay ever shows signing_secret. Write it to your secret store before anything else and load it as RELAY_WEBHOOK_SECRET where your receiver runs. You use it to verify every incoming request:

Update or delete a subscription

Every later operation takes the subscription ID. An update accepts the same fields as create plus is_active, which pauses delivery without losing the secret. Delete the subscription when the receiver goes away, or to switch the agent to WebSocket delivery:

Choose the delivery path

The saved subscriptions decide how the agent receives events; any saved subscription, active or not, puts the agent in webhook mode. The first subscription closes any connected WebSocket. Deleting the last subscription moves pending events back to WebSocket, where they wait for your backend with their event_id and body unchanged.

What you get back

Create answers 201, delete answers 204 with no body, and the other operations return the subscription:

When it fails

A 401 means the Agent Token is missing or revoked, and a 404 means the subscription ID is not one of this agent’s. A body that fails validation, such as a URL that is not HTTPS or an event name outside the catalog, is rejected with code 1005. A lost signing secret cannot be read back; delete the subscription and create a new one.

Next steps