Overview
Webhooks notify your application when events occur in Sorcia, such as documents being indexed or queries being made.Setting Up Webhooks
Available Events
document.indexed
Triggered when a document is successfully indexed.
document.updated
Document content changed.
document.deleted
Document removed from index.
query.completed
Query processed (requires analytics permission).
Webhook Signature
Verify webhook authenticity using signature:Best Practices
Respond Quickly
Respond Quickly
Return 200 status within 5 seconds. Process async if needed.
Verify Signatures
Verify Signatures
Always verify webhook signatures to prevent spoofing.
Handle Retries
Handle Retries
Webhooks retry up to 3 times. Implement idempotency.
Use HTTPS
Use HTTPS
Webhook endpoints must use HTTPS in production.
Retry Behavior
Failed webhooks are retried:- 1st retry: 1 minute later
- 2nd retry: 5 minutes later
- 3rd retry: 15 minutes later
- After 3 failures: Webhook disabled
Testing
Test webhooks locally with ngrok:Next Steps
Documents API
Manage documents