Webhooks

The Webhooks API enable you to register and manage webhooks. You can also use the API to list webhook deliveries for a webhook.

Register webhook

Registers a webhook.

POST /api/webhooks
Body parameters
payload_url string required

The URL to which the payloads will be delivered.

secret string

If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.

triggers array of strings required

A list of event groups that will trigger this webhook.

enabled boolean

Gets or sets a value indicating wheter the webhook is enabled (if notifications are sent when the webhook is triggered).

Example request
curl {WEAVY-URL}/api/webhooks
-H "Authorization: Bearer {API-KEY}"
--json "{'payload_url': 'https://www.example.com/webhooks/incoming', 'triggers': ['notifications']}"
Response codes

201 Created
400 Bad Request
401 Unauthorized
403 Forbidden
422 Validation Failed

Response schema
{
  "id": "integer",
  "payload_url": "string",
  "triggers": [
    "string"
  ],
  "is_enabled": "boolean"
}

Get webhook

Get a webhook by id.

GET /api/webhooks/{id}
Path parameters
id integer required

The unique identifier of the hook.

Example request
curl {WEAVY-URL}/api/webhooks/1
-H "Authorization: Bearer {API-KEY}"
Response codes

200 OK
401 Unauthorized
404 Not Found

Response schema
{
  "id": "integer",
  "payload_url": "string",
  "triggers": [
    "string"
  ],
  "is_enabled": "boolean"
}

Update webhook

Update a webhook registration.

PATCH /api/webhooks/{id}
Path parameters
id integer required

The unique identifier of the hook.

Body parameters
payload_url string required

The URL to which the payloads will be delivered.

secret string

If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.

triggers array of strings required

A list of event groups that will trigger this webhook.

is_enabled boolean

Indicates if the webhook is enabled (if notifications are sent when the webhook is triggered).

Example request
curl -X PATCH {WEAVY-URL}/api/webhooks/1
-H "Authorization: Bearer {API-KEY}"
--json "{ 'triggers': ['notifications', 'comments'] }"
Response codes

200 OK
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
422 Validation Failed

Response schema
{
  "id": "integer",
  "payload_url": "string",
  "triggers": [
    "string"
  ],
  "is_enabled": "boolean"
}

List webhooks

Returns the list of registered webhooks.

GET /api/webhooks
Query parameters
q string

A query used to find matching items.

tag string

List items with the specified tag.

trashed boolean

Indicates whether trashed items should be listed (default is false). Specify null to return both trashed and non-trashed items.

order_by string

Specifies the sort order and direction for the listing, e.g. "id" or "id+desc"

skip integer

The number of items to skip. Used together with take to return a specific range of items (for pagination).

take integer

Maximum number of items to return in the listing. Should be a value between 1 and 100. Default is 25.

count_only boolean

true to only return the number of matching items; when this is specified the response will only contain the count property.

Example request
curl {WEAVY-URL}/api/webhooks
-H "Authorization: Bearer {API-KEY}"
Response codes

200 OK
401 Unauthorized

Response schema
{
  "data": [
    {
      "id": "integer",
      "payload_url": "string",
      "triggers": [
        "string"
      ],
      "is_enabled": "boolean"
    }
  ],
  "start": "integer",
  "end": "integer",
  "count": "integer"
}

List deliveries

List webhook deliveries.

GET /api/webhooks/{id}/deliveries
Path parameters
id integer required

Webhook id

Query parameters
action string
q string

A query used to find matching items.

tag string

List items with the specified tag.

trashed boolean

Indicates whether trashed items should be listed (default is false). Specify null to return both trashed and non-trashed items.

order_by string

Specifies the sort order and direction for the listing, e.g. "id" or "id+desc"

skip integer

The number of items to skip. Used together with take to return a specific range of items (for pagination).

take integer

Maximum number of items to return in the listing. Should be a value between 1 and 100. Default is 25.

count_only boolean

true to only return the number of matching items; when this is specified the response will only contain the count property.

Example request
curl {WEAVY-URL}/api/webhooks/1/deliveries?take=25
-H "Authorization: Bearer {API-KEY}"
Response codes

200 OK
401 Unauthorized
404 Not Found

Response schema
{
  "data": [
    {
      "id": "integer",
      "guid": "string",
      "event_id": "integer",
      "action": "string",
      "delivered_at": "string",
      "duration": "number",
      "status_code": "integer",
      "status": "string"
    }
  ],
  "start": "integer",
  "end": "integer",
  "count": "integer"
}

Delete webhook

Delete a webhook

DELETE /api/webhooks/{id}
Path parameters
id integer required

The unique identifier of the hook.

Example request
curl -X DELETE {WEAVY-URL}/api/webhooks/1
-H "Authorization: Bearer {API-KEY}"
Response codes

204 No Content
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found

Ask AI
Support

To access live chat with our developer success team you need a Weavy account.

Sign in or create a Weavy account