Real-Time Events
Legalesign can push events to your application in real time — document signed, upload completed, send failed, and so on. There are two mechanisms, and you can use either or both.
Subscriptions
GraphQL subscriptions open a persistent WebSocket connection to the Legalesign AppSync endpoint. Your client receives events as they happen, with no polling.
Best for:
- Frontend apps that need instant UI updates
- Tracking upload or send progress in real time
- Any flow where you're already holding a GraphQL connection
Get started: Subscriptions Quickstart
Guides:
- Connect to AppSync Subscriptions
- Track Send Tasks
- Track Upload Progress
- Track Document & Recipient Lifecycle
Webhooks
Webhooks send an HTTP POST to a URL you configure whenever an event occurs. No persistent connection needed — your server just handles incoming requests.
Best for:
- Backend integrations and automation
- Systems behind firewalls that can receive HTTP but not hold WebSocket connections
- Simple "notify me when done" workflows
Get started: Webhooks
Which Should I Use?
| Subscriptions | Webhooks | |
|---|---|---|
| Connection | Persistent WebSocket | HTTP POST per event |
| Latency | Instant | Near-instant |
| Best for | Frontend / interactive apps | Backend / automation |
| Auth | OAuth token on connection | Configured URL + optional secret |
| Retry | Client reconnects | Legalesign retries on failure |
You can use both together — for example, subscriptions to update your UI and webhooks to trigger backend workflows.