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
requiredThe 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
requiredA 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
requiredThe 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
requiredThe unique identifier of the hook.
Body parameters
payload_url
string
requiredThe 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
requiredA 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
). Specifynull
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
and100
. Default is25
.
count_only
boolean
true
to only return the number of matching items; when this is specified the response will only contain thecount
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
requiredWebhook 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
). Specifynull
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
and100
. Default is25
.
count_only
boolean
true
to only return the number of matching items; when this is specified the response will only contain thecount
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
requiredThe 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