Webhooks

Create a webhook endpoint

Registers a URL to receive events. The signing secret is returned only once, so store it securely. You can have up to 10 endpoints.

POST
/v1/webhooks

Registers a URL to receive events. The signing secret is returned only once, so store it securely. You can have up to 10 endpoints.

Authorization

bearer
headerAuthorizationBearer <JWT>

Your secret API key: sk_live_… for live traffic or sk_test_… for testing.

Request Body

application/json
  1. body
url*string

HTTPS URL that receives events.

Formaturi
Lengthlength <= 2048
events*array<>

Events to subscribe to.

Items1 <= items
description?string

A note to help you recognise this endpoint.

Lengthlength <= 200

Response Body

The endpoint was created.

application/json
Example Request
curl -X POST 'https://api.appstractone.com/v1/webhooks' \
  -H 'Content-Type: application/json' \
  -d '{
  "url": "https://example.com/webhooks/appstract",
  "events": [
    "message.delivered",
    "message.failed"
  ]
}'
Example Response
{
  "id": "whe_01M6MJSC366MMHPMM73ABCM5JA",
  "url": "https://example.com/webhooks/appstract",
  "events": [
    "message.delivered",
    "message.failed"
  ],
  "description": "Order notifications",
  "enabled": true,
  "createdAt": "2026-11-05T00:47:20.681Z",
  "updatedAt": "2026-11-05T00:47:20.681Z",
  "secret": "whsec_3f9c2b7e1d4a6f8b0c5e2d9a7b1f4c6e"
}