subscribe
Create a substrate event subscription using webhook or SSE, with filters for entity types, IDs, or event types, and optional cross-instance loop prevention.
Instructions
Create a substrate event subscription (webhook with HMAC delivery, or SSE via GET /events/stream). Requires at least one filter among entity_types, entity_ids, or event_types. Optional sync_peer_id skips webhook delivery when the substrate event carries the same source_peer_id (cross-instance loop prevention).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entity_types | No | ||
| entity_ids | No | ||
| event_types | No | ||
| delivery_method | Yes | ||
| webhook_url | No | ||
| webhook_secret | No | ||
| max_failures | No | ||
| sync_peer_id | No | When set, webhook deliveries skip substrate events whose `source_peer_id` equals this value (prevents notifying a peer about changes that originated from that peer). |