Webhooks allow you to receive real-time HTTP notifications when data changes in your Archie Core project. When a record is created, updated, or deleted, Archie Core sends aDocumentation Index
Fetch the complete documentation index at: https://archie.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
POST request to your configured URL with the event details.
How webhooks work
- Register a webhook subscription specifying the table, events, and target URL
- Data changes — when a matching mutation occurs (via REST API or GraphQL), an event is published
- Delivery — the webhook service sends an HTTP
POSTto your URL with the event payload - Verification — validate the HMAC signature to ensure the request is authentic
Webhook management API
All webhook management endpoints are under/api/rest/_webhooks and require a management API token.
Required headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <management-api-token> |
X-Project-ID | Yes | Your project identifier |
environment | Yes | Target environment name |
Important: Theenvironmentheader is required for all webhook management endpoints. The header value must match theenvironmentfield in the request body when creating or updating webhooks.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
POST | /api/rest/_webhooks | Create a webhook subscription |
GET | /api/rest/_webhooks | List all webhook subscriptions |
GET | /api/rest/_webhooks/:id | Get subscription + deliveries |
PATCH | /api/rest/_webhooks/:id | Update a subscription |
DELETE | /api/rest/_webhooks/:id | Delete a subscription |
Create a webhook
RequestRequest body
| Field | Type | Required | Description |
|---|---|---|---|
projectId | String | Yes | Project identifier |
environment | String | Yes | Target environment |
table | String | Yes | Table name to watch |
events | Array | Yes | Event types: INSERT, UPDATE, DELETE |
url | String | Yes | HTTPS endpoint to receive events |
secret | String | Yes | Secret for HMAC signature verification |
active | Boolean | No | Enable/disable the webhook (default: true) |
filter | Object | No | Only trigger for records matching this filter |
select | Array | No | Fields to include in the payload |
Optional filtering
Only fire the webhook when specific conditions are met:Field selection
Limit which fields are included in the event payload:List webhooks
Get webhook details
Returns the webhook subscription along with its recent delivery history.Update a webhook
Delete a webhook
Event payload
When a data mutation occurs, the webhook service delivers an HTTPPOST to your URL:
| Field | Description |
|---|---|
id | Unique event identifier |
timestamp | ISO 8601 timestamp of the event |
project_id | Project that generated the event |
environment | Environment where the mutation occurred |
table | Table that was modified |
event | Event type: INSERT, UPDATE, or DELETE |
record | The full record (or selected fields) after mutation |
data | Same as record (alias for compatibility) |
changed_fields | List of fields that changed (for UPDATE events) |
Note: ForDELETEevents,recordanddatacontain the record as it was before deletion. Thechanged_fieldsarray is empty forINSERTandDELETEevents.
Delivery headers
Each webhook delivery includes these headers:| Header | Value | Description |
|---|---|---|
Content-Type | application/json | Payload format |
X-Archie-Event | INSERT / UPDATE / DELETE | Event type |
X-Archie-Delivery | evt_abc123def456 | Event ID for tracking |
X-Archie-Signature | sha256=<hex> | HMAC-SHA256 signature with prefix |
X-Webhook-Signature | <hex> | Raw HMAC-SHA256 hex digest |
Verifying signatures
Every delivery is signed using HMAC-SHA256 with the webhook’ssecret. Always verify the signature before processing the payload.
Node.js example
Python example
Retry policy
If your endpoint returns a non-2xx response or is unreachable, the webhook service retries delivery with exponential backoff:| Attempt | Delay |
|---|---|
| 1 | Immediate |
| 2 | ~1 second |
| 3 | ~5 seconds |
| 4 | ~30 seconds |
| 5 | ~5 minutes |
Circuit breaker
If an endpoint fails consecutively, the webhook service activates a circuit breaker to protect your endpoint:- Opens after 5 consecutive failures per endpoint
- Cooldown period: 2 minutes
- During cooldown, deliveries are queued and retried after the cooldown expires
Best practices
- Always verify signatures — never trust a webhook payload without HMAC verification
- Respond quickly — return a
200status within 5 seconds; process events asynchronously if needed. Long-running handlers are the natural use case for custom functions — the webhook receiver dispatches to a function, which acknowledges immediately and processes in the background. - Handle duplicates — use the event
idto implement idempotent processing - Use HTTPS — webhook URLs must use HTTPS for secure delivery
- Monitor deliveries — check the webhook details endpoint regularly to catch persistent failures
FAQ
Where do I find webhook URLs to register with the third-party service?
Where do I find webhook URLs to register with the third-party service?
The integration’s settings page in your project shows the URL to register.
What is the timeout for handlers?
What is the timeout for handlers?
Return a
200 status within 5 seconds. Process longer work asynchronously and acknowledge the delivery first.Can I see a log of every webhook received?
Can I see a log of every webhook received?
Yes — the webhook details endpoint (
GET /api/rest/_webhooks/:id) returns recent deliveries with status, HTTP code, attempts, and timestamp.