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.
Parameters
| Name |
In |
Type |
Required |
Description |
event |
query |
string |
no |
|
active |
query |
string |
no |
|
per_page |
query |
string |
no |
|
Responses
| Status |
Description |
| 200 |
For non-paginated data, return as before |
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.
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.
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.
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.
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.
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.
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.
Parameters
| Name |
In |
Type |
Required |
Description |
id |
path |
integer |
yes |
|
Responses
| Status |
Description |
| 500 |
|
| 200 |
For non-paginated data, return as before |
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"