Webhook settings
A webhook-type integration subscribes to a set of platform events (see the webhook events reference) and, whenever they fire, POSTs a signed body to the given URL. Through this group you create and configure AISAR outbound webhooks, manage their secrets, and read delivery logs. Bitrix24 and amoCRM connect through their own OAuth flows in the my.aisar.app dashboard and are not covered by this reference.
Authentication, retries, and filters
Bearer/basic auth on the receiving end, retry with a bounded attempt count, and channel filtering are all supported.
Providers catalog and summary
The available providers catalog is returned by GET /v1/integration-providers, and a per-type summary of active integrations by GET /v1/integrations/summary.
Event source
The event keys for the selectedEventKeys field come from the system-events catalog GET /v1/system-events — the single source of events a webhook can subscribe to (full payload schemas live in the webhook events reference).
Secret rotation
Integration secrets (signingSecret, bearerToken, basicUsername, basicPassword) are rotated with a PATCH carrying a new secrets object; the response updates credential.rotated_at.
Endpoints
| Method | Path | Summary |
|---|---|---|
| GET | /v1/integrationsList integrations (filterable by type, status) | List integrations (filterable by type, status) |
| POST | /v1/integrationsCreate a webhook integration | Create a webhook integration |
| GET | /v1/integrations/{integration}Get an integration (with credential and mappings) | Get an integration (with credential and mappings) |
| PATCH | /v1/integrations/{integration}Update an integration | Update an integration |
| DELETE | /v1/integrations/{integration}Delete an integration | Delete an integration |
| GET | /v1/integrations/{integration}/logsWebhook delivery logs | Webhook delivery logs |
| POST | /v1/integrations/test-webhookSend a one-off test delivery to a given URL (no integration saved) | Send a one-off test delivery to a given URL (no integration saved) |
| GET | /v1/integration-providersIntegration providers catalog (query: published) | Integration providers catalog (query: published) |
| GET | /v1/integrations/summaryIntegration counts grouped by type | Integration counts grouped by type |
| GET | /v1/system-eventsSystem-events catalog — the source of event keys for webhooks (query: type, group) | System-events catalog — the source of event keys for webhooks (query: type, group) |
Examples
Create a webhook integration
Request
curl -X POST https://api.aisar.app/v1/integrations \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "webhook",
"name": "n8n Production",
"status": "active",
"settings": {
"url": "https://example.com/webhook",
"authType": "bearer",
"selectedEventKeys": ["message.created", "conversation.created"],
"channelFilter": "all",
"timeoutSeconds": 30,
"retryEnabled": true,
"maxAttempts": 6
},
"secrets": { "bearerToken": "your-receiving-endpoint-secret" }
}'Response
{
"data": {
"id": 14,
"type": "webhook",
"name": "n8n Production",
"status": "active",
"health": {
"last_success_at": null,
"last_failure_at": null,
"last_error": null,
"consecutive_failures": 0
},
"settings": {
"url": "https://example.com/webhook",
"authType": "bearer",
"selectedEventKeys": ["message.created", "conversation.created"],
"channelFilter": "all",
"timeoutSeconds": 30,
"retryEnabled": true,
"maxAttempts": 6
},
"credential": {
"secrets": { "bearerToken": "your-receiving-endpoint-secret" },
"expires_at": null,
"last_refreshed_at": null,
"rotated_at": null,
"created_at": "2026-03-15T10:00:00.000000Z",
"updated_at": "2026-03-15T10:00:00.000000Z"
},
"external_entities": [],
"mappings": [],
"funnel_mappings": [],
"created_at": "2026-03-15T10:00:00.000000Z",
"updated_at": "2026-03-15T10:00:00.000000Z"
}
}Webhook delivery logs
Request
curl "https://api.aisar.app/v1/integrations/14/logs?limit=50" \
-H "Authorization: Bearer YOUR_API_TOKEN"Response
{
"data": [
{
"id": 8801,
"level": "info",
"code": "webhook.delivery",
"message": "Webhook delivered.",
"context": {
"event_key": "message.created",
"status": "success",
"status_code": 200,
"duration_ms": 420
},
"created_at": "2026-03-15T10:05:00.000000Z"
}
]
}Integration providers catalog
Request
curl "https://api.aisar.app/v1/integration-providers?published=1" \
-H "Authorization: Bearer YOUR_API_TOKEN"Response
{
"data": [
{
"id": 1,
"key": "webhook",
"name": "Webhook",
"description": "Outbound webhook integration",
"is_published": true,
"created_at": "2026-03-01T09:00:00.000000Z",
"updated_at": "2026-03-01T09:00:00.000000Z"
},
{
"id": 2,
"key": "bitrix24",
"name": "Bitrix24",
"description": "Bitrix24 CRM connector",
"is_published": true,
"created_at": "2026-03-01T09:00:00.000000Z",
"updated_at": "2026-03-01T09:00:00.000000Z"
}
]
}Integration summary by type
Request
curl "https://api.aisar.app/v1/integrations/summary" \
-H "Authorization: Bearer YOUR_API_TOKEN"Response
{
"data": [
{ "type": "webhook", "count": 2 },
{ "type": "bitrix24", "count": 1 }
]
}Rotate integration secrets (switch to basic auth)
Request
curl -X PATCH https://api.aisar.app/v1/integrations/14 \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"settings": {
"url": "https://example.com/webhook",
"description": "Production automation",
"signatureHeader": "X-AISAR-Signature",
"authType": "basic",
"selectedEventKeys": ["message.created", "conversation.created"],
"channelFilter": "all",
"timeoutSeconds": 30,
"retryEnabled": true,
"maxAttempts": 6,
"concurrency": 4
},
"secrets": {
"signingSecret": "YOUR_SIGNING_SECRET",
"basicUsername": "webhook-user",
"basicPassword": "YOUR_BASIC_PASSWORD"
}
}'Response
{
"data": {
"id": 14,
"type": "webhook",
"name": "n8n Production",
"status": "active",
"settings": {
"url": "https://example.com/webhook",
"description": "Production automation",
"signatureHeader": "X-AISAR-Signature",
"authType": "basic",
"selectedEventKeys": ["message.created", "conversation.created"],
"channelFilter": "all",
"timeoutSeconds": 30,
"retryEnabled": true,
"maxAttempts": 6,
"concurrency": 4
},
"credential": {
"secrets": {
"signingSecret": "YOUR_SIGNING_SECRET",
"basicUsername": "webhook-user",
"basicPassword": "YOUR_BASIC_PASSWORD"
},
"expires_at": null,
"last_refreshed_at": null,
"rotated_at": "2026-03-16T08:30:00.000000Z",
"created_at": "2026-03-15T10:00:00.000000Z",
"updated_at": "2026-03-16T08:30:00.000000Z"
},
"external_entities": [],
"mappings": [],
"funnel_mappings": [],
"created_at": "2026-03-15T10:00:00.000000Z",
"updated_at": "2026-03-16T08:30:00.000000Z"
}
}System events — the webhook event source
Request
curl "https://api.aisar.app/v1/system-events?group=Messages" \
-H "Authorization: Bearer YOUR_API_TOKEN"Response
{
"data": [
{
"id": 1,
"key": "message.created",
"type": "message",
"name": "Message created",
"description": "A new message is created in a conversation.",
"group": "Messages",
"metadata": {},
"created_at": "2026-03-01T09:00:00.000000Z",
"updated_at": "2026-03-01T09:00:00.000000Z"
},
{
"id": 2,
"key": "message.updated",
"type": "message",
"name": "Message updated",
"description": "A message is edited.",
"group": "Messages",
"metadata": {},
"created_at": "2026-03-01T09:00:00.000000Z",
"updated_at": "2026-03-01T09:00:00.000000Z"
}
]
}