Webhook endpoints
Webhook Endpoints API
Manage webhook endpoints and inspect the event log.
List webhook endpoints
/v1/webhook_endpointsLists all webhook endpoints (unpaginated). The signing secret is never returned.
Required scope: webhooks:manage.
curl "https://api.asks.app/v1/webhook_endpoints" \
-H "Authorization: Bearer $ASKS_API_KEY"{
"object": "list",
"data": [
{
"object": "webhook_endpoint",
"id": "string",
"url": "string",
"description": {},
"enabled_events": [
"string"
],
"status": "enabled",
"consecutive_failures": 1,
"last_error_at": {},
"disabled_at": {},
"created_at": {},
"updated_at": {}
}
],
"has_more": true,
"next_cursor": {}
}Create a webhook endpoint
/v1/webhook_endpointsCreates a webhook endpoint. The response includes the signing secret exactly once. The URL must be HTTPS and pass SSRF validation.
Required scope: webhooks:manage.
urlstringrequiredHTTPS URL to deliver events to.
descriptionstringenabled_eventsarray of stringrequiredEvent types to subscribe to, or `["*"]` for all.
curl -X POST "https://api.asks.app/v1/webhook_endpoints" \
-H "Authorization: Bearer $ASKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"description": "string",
"enabled_events": [
"*"
]
}'{
"object": "webhook_endpoint",
"id": "string",
"url": "string",
"description": {},
"enabled_events": [
"string"
],
"status": "enabled",
"consecutive_failures": 1,
"last_error_at": {},
"disabled_at": {},
"created_at": {},
"updated_at": {},
"secret": "string"
}Retrieve a webhook endpoint
/v1/webhook_endpoints/{id}Required scope: webhooks:manage.
curl "https://api.asks.app/v1/webhook_endpoints/<id>" \
-H "Authorization: Bearer $ASKS_API_KEY"{
"object": "webhook_endpoint",
"id": "string",
"url": "string",
"description": {},
"enabled_events": [
"string"
],
"status": "enabled",
"consecutive_failures": 1,
"last_error_at": {},
"disabled_at": {},
"created_at": {},
"updated_at": {}
}Update a webhook endpoint
/v1/webhook_endpoints/{id}Update URL, description, events, or status. Setting status to enabled clears the failure counter.
Required scope: webhooks:manage.
urlstringdescriptionstringnullenabled_eventsarray of stringstatusstringOne of: enabled, disabled.
curl -X PATCH "https://api.asks.app/v1/webhook_endpoints/<id>" \
-H "Authorization: Bearer $ASKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"description": {},
"enabled_events": [
"*"
],
"status": "enabled"
}'{
"object": "webhook_endpoint",
"id": "string",
"url": "string",
"description": {},
"enabled_events": [
"string"
],
"status": "enabled",
"consecutive_failures": 1,
"last_error_at": {},
"disabled_at": {},
"created_at": {},
"updated_at": {}
}Delete a webhook endpoint
/v1/webhook_endpoints/{id}Required scope: webhooks:manage.
curl -X DELETE "https://api.asks.app/v1/webhook_endpoints/<id>" \
-H "Authorization: Bearer $ASKS_API_KEY"{
"object": "webhook_endpoint",
"id": "string",
"deleted": true
}Roll the signing secret
/v1/webhook_endpoints/{id}/roll_secretGenerates a new signing secret, returned once. The old secret stops working immediately.
Required scope: webhooks:manage.
curl -X POST "https://api.asks.app/v1/webhook_endpoints/<id>/roll_secret" \
-H "Authorization: Bearer $ASKS_API_KEY"{
"object": "webhook_endpoint",
"id": "string",
"url": "string",
"description": {},
"enabled_events": [
"string"
],
"status": "enabled",
"consecutive_failures": 1,
"last_error_at": {},
"disabled_at": {},
"created_at": {},
"updated_at": {},
"secret": "string"
}Send a test event
/v1/webhook_endpoints/{id}/testEnqueues a synthetic ping event to this endpoint.
Required scope: webhooks:manage.
curl -X POST "https://api.asks.app/v1/webhook_endpoints/<id>/test" \
-H "Authorization: Bearer $ASKS_API_KEY"{
"object": "webhook_endpoint",
"id": "string",
"test_event_enqueued": true
}List deliveries
/v1/webhook_endpoints/{id}/deliveriesCursor-paginated delivery attempts for this endpoint, newest first.
Required scope: webhooks:manage.
limitintegerPage size (1–100).
starting_afterstringCursor: the `id` of the last item from the previous page.
curl "https://api.asks.app/v1/webhook_endpoints/<id>/deliveries" \
-H "Authorization: Bearer $ASKS_API_KEY"{
"object": "list",
"data": [
{
"object": "webhook_delivery",
"id": "string",
"event_id": "string",
"event_type": "string",
"status": "pending",
"attempt_count": 1,
"next_retry_at": {},
"last_attempt_at": {},
"response_status": {},
"response_body": {},
"created_at": {}
}
],
"has_more": true,
"next_cursor": {}
}Retry a delivery
/v1/webhook_endpoints/{id}/deliveries/{deliveryId}/retryRe-enqueues a previous delivery attempt.
Required scope: webhooks:manage.
curl -X POST "https://api.asks.app/v1/webhook_endpoints/<id>/deliveries/<deliveryId>/retry" \
-H "Authorization: Bearer $ASKS_API_KEY"{
"object": "webhook_delivery",
"id": "string",
"retry_enqueued": true
}List events
/v1/eventsCursor-paginated log of webhook events generated in the workspace, newest first.
Required scope: webhooks:manage.
limitintegerPage size (1–100).
starting_afterstringCursor: the `id` of the last item from the previous page.
curl "https://api.asks.app/v1/events" \
-H "Authorization: Bearer $ASKS_API_KEY"{
"object": "list",
"data": [
{
"object": "event",
"id": "string",
"type": "*",
"data": {},
"created_at": {}
}
],
"has_more": true,
"next_cursor": {}
}