WebhookSubscription
Webhook subscriptions, event catalog, test deliveries, and logs
List webhook subscriptions
GET /api/v1/webhooks
Requires authentication (Bearer token) and the X-Organization-Id header.
API token scope: webhooks.view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
event |
query | string | no | |
active |
query | string | no | |
page |
query | integer | no | |
per_page |
query | integer | no |
Responses
| Status | Description |
|---|---|
| 200 | For non-paginated data, return as before |
| 422 |
Example request
curl -X GET "https://kworia.com/api/v1/webhooks" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json"
Create webhook subscription
POST /api/v1/webhooks
Requires authentication (Bearer token) and the X-Organization-Id header.
API token scope: webhooks.manage
Request body
| Field | Type | Required | Description |
|---|---|---|---|
url |
string | yes | |
secret |
string | no | |
description |
string | no | |
events |
array | yes |
Responses
| Status | Description |
|---|---|
| 201 | For non-paginated data, return as before |
| 422 |
Example request
curl -X POST "https://kworia.com/api/v1/webhooks" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"url": "string",
"secret": "string",
"description": "string",
"events": []
}'
Get available webhook events
GET /api/v1/webhooks/events
Requires authentication (Bearer token) and the X-Organization-Id header.
API token scope: webhooks.view
Responses
| Status | Description |
|---|---|
| 200 | For non-paginated data, return as before |
Example request
curl -X GET "https://kworia.com/api/v1/webhooks/events" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json"
Get webhook subscription details
GET /api/v1/webhooks/{id}
Requires authentication (Bearer token) and the X-Organization-Id header.
API token scope: webhooks.view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | integer | yes |
Responses
| Status | Description |
|---|---|
| 200 | For non-paginated data, return as before |
Example request
curl -X GET "https://kworia.com/api/v1/webhooks/{id}" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json"
Update webhook subscription
PUT /api/v1/webhooks/{id}
Requires authentication (Bearer token) and the X-Organization-Id header.
API token scope: webhooks.manage
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | integer | yes |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
url |
string | no | |
is_active |
boolean | no | |
description |
string | no | |
events |
array | no |
Responses
| Status | Description |
|---|---|
| 200 | For non-paginated data, return as before |
| 422 |
Example request
curl -X PUT "https://kworia.com/api/v1/webhooks/{id}" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"url": "string",
"is_active": true,
"description": "string",
"events": []
}'
Delete webhook subscription
DELETE /api/v1/webhooks/{id}
Requires authentication (Bearer token) and the X-Organization-Id header.
API token scope: webhooks.manage
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | integer | yes |
Responses
| Status | Description |
|---|---|
| 200 | For non-paginated data, return as before |
Example request
curl -X DELETE "https://kworia.com/api/v1/webhooks/{id}" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json"
Get webhook delivery logs
GET /api/v1/webhooks/{id}/logs
Requires authentication (Bearer token) and the X-Organization-Id header.
API token scope: webhooks.view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | integer | yes |
Responses
| Status | Description |
|---|---|
| 200 | For non-paginated data, return as before |
Example request
curl -X GET "https://kworia.com/api/v1/webhooks/{id}/logs" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json"
Test webhook subscription
POST /api/v1/webhooks/{id}/test
Requires authentication (Bearer token) and the X-Organization-Id header.
API token scope: webhooks.manage
Sends a signed webhook.test event to the subscription's URL and reports whether the endpoint answered with a 2xx status. The endpoint's response body is never returned.
Webhook URLs must use https and a public host name. IP addresses, internal names and hosts that resolve to private or reserved networks are refused when the subscription is created or updated, and checked again at every delivery: a refused target returns 422 with the reason, and an endpoint that cannot be reached returns 502.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | integer | yes |
Responses
| Status | Description |
|---|---|
| 200 | For non-paginated data, return as before |
| 502 | |
| 422 |
Example request
curl -X POST "https://kworia.com/api/v1/webhooks/{id}/test" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json"