Webhook endpoints
REST reference

Webhook Endpoints API

Manage webhook endpoints and inspect the event log.

List webhook endpoints

GET/v1/webhook_endpoints

Lists all webhook endpoints (unpaginated). The signing secret is never returned.

Required scope: webhooks:manage.

Request
cURL
curl "https://api.asks.app/v1/webhook_endpoints" \
  -H "Authorization: Bearer $ASKS_API_KEY"
Response 200
JSON
{
  "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

POST/v1/webhook_endpoints

Creates a webhook endpoint. The response includes the signing secret exactly once. The URL must be HTTPS and pass SSRF validation.

Required scope: webhooks:manage.

Request body
urlstringrequired

HTTPS URL to deliver events to.

descriptionstring
enabled_eventsarray of stringrequired

Event types to subscribe to, or `["*"]` for all.

Request
cURL
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": [
      "*"
    ]
  }'
Response 201
JSON
{
  "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

GET/v1/webhook_endpoints/{id}

Required scope: webhooks:manage.

Request
cURL
curl "https://api.asks.app/v1/webhook_endpoints/<id>" \
  -H "Authorization: Bearer $ASKS_API_KEY"
Response 200
JSON
{
  "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

PATCH/v1/webhook_endpoints/{id}

Update URL, description, events, or status. Setting status to enabled clears the failure counter.

Required scope: webhooks:manage.

Request body
urlstring
descriptionstringnull
enabled_eventsarray of string
statusstring

One of: enabled, disabled.

Request
cURL
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"
  }'
Response 200
JSON
{
  "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

DELETE/v1/webhook_endpoints/{id}

Required scope: webhooks:manage.

Request
cURL
curl -X DELETE "https://api.asks.app/v1/webhook_endpoints/<id>" \
  -H "Authorization: Bearer $ASKS_API_KEY"
Response 200
JSON
{
  "object": "webhook_endpoint",
  "id": "string",
  "deleted": true
}

Roll the signing secret

POST/v1/webhook_endpoints/{id}/roll_secret

Generates a new signing secret, returned once. The old secret stops working immediately.

Required scope: webhooks:manage.

Request
cURL
curl -X POST "https://api.asks.app/v1/webhook_endpoints/<id>/roll_secret" \
  -H "Authorization: Bearer $ASKS_API_KEY"
Response 200
JSON
{
  "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

POST/v1/webhook_endpoints/{id}/test

Enqueues a synthetic ping event to this endpoint.

Required scope: webhooks:manage.

Request
cURL
curl -X POST "https://api.asks.app/v1/webhook_endpoints/<id>/test" \
  -H "Authorization: Bearer $ASKS_API_KEY"
Response 200
JSON
{
  "object": "webhook_endpoint",
  "id": "string",
  "test_event_enqueued": true
}

List deliveries

GET/v1/webhook_endpoints/{id}/deliveries

Cursor-paginated delivery attempts for this endpoint, newest first.

Required scope: webhooks:manage.

Parameters
limitinteger

Page size (1–100).

starting_afterstring

Cursor: the `id` of the last item from the previous page.

Request
cURL
curl "https://api.asks.app/v1/webhook_endpoints/<id>/deliveries" \
  -H "Authorization: Bearer $ASKS_API_KEY"
Response 200
JSON
{
  "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

POST/v1/webhook_endpoints/{id}/deliveries/{deliveryId}/retry

Re-enqueues a previous delivery attempt.

Required scope: webhooks:manage.

Request
cURL
curl -X POST "https://api.asks.app/v1/webhook_endpoints/<id>/deliveries/<deliveryId>/retry" \
  -H "Authorization: Bearer $ASKS_API_KEY"
Response 200
JSON
{
  "object": "webhook_delivery",
  "id": "string",
  "retry_enqueued": true
}

List events

GET/v1/events

Cursor-paginated log of webhook events generated in the workspace, newest first.

Required scope: webhooks:manage.

Parameters
limitinteger

Page size (1–100).

starting_afterstring

Cursor: the `id` of the last item from the previous page.

Request
cURL
curl "https://api.asks.app/v1/events" \
  -H "Authorization: Bearer $ASKS_API_KEY"
Response 200
JSON
{
  "object": "list",
  "data": [
    {
      "object": "event",
      "id": "string",
      "type": "*",
      "data": {},
      "created_at": {}
    }
  ],
  "has_more": true,
  "next_cursor": {}
}