This document focuses specifically on managing WebHook Subscribers using the Clara API endpoints under /api/v1/subscribers
.
Each section includes request format, parameters, example payloads, and HTTP responses.
This document provides detailed usage instructions for the /api/v1/subscribers
endpoint, including payloads, descriptions, and HTTP status codes.
POST /api/v1/subscribers
Field | Type | Required | Description |
---|
name | string | β
Yes | Name of the webhook subscriber |
callbackUrl | string | β
Yes | URL to which webhook POSTs will be delivered |
events | string[] | β
Yes | List of subscribed event types (e.g. PAYMENT_PAID ) |
enabled | boolean | β No | Whether the subscriber is active |
companyUuid | uuid | β No | Company UUID if not passed in credential |
{
"name": "My Webhook",
"callbackUrl": "https://example.com/my/webhook/endpoint",
"events": [
"PAYMENT_PAID",
"CARD_CREATION_REQUEST_CREATED"
],
"enabled": true,
"companyUuid": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed"
}
Status | Meaning |
---|
201 | Subscriber created successfully |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
PATCH /api/v1/subscribers/{uuid}
Field | Type | Required | Description |
---|
name | string | β No | Updated name |
callbackUrl | string | β No | New webhook target URL |
events | string[] | β No | Updated list of event types |
enabled | boolean | β No | Whether the subscriber is active or not |
companyUuid | uuid | β No | Optional company identifier |
{
"name": "Updated Webhook",
"callbackUrl": "https://api.company.com/hook",
"events": [
"CARD_CREATION_REQUEST_ERROR"
],
"enabled": false
}
Status | Meaning |
---|
200 | Subscriber updated |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
POST /api/v1/subscribers/add-event
Field | Type | Required | Description |
---|
callbackUrl | string | β
Yes | Callback URL of the target subscriber |
event | string | β
Yes | Event to add (e.g. CARD_CREATION_REQUEST_CREATED ) |
companyUuid | uuid | β No | Optional company UUID |
{
"callbackUrl": "https://example.com/my/webhook/endpoint",
"event": "CARD_CREATION_REQUEST_CREATED"
}
Status | Meaning |
---|
201 | Event added |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
DELETE /api/v1/subscribers/delete-event
Field | Type | Required | Description |
---|
callbackUrl | string | β
Yes | Callback URL of the subscriber |
event | string | β
Yes | Event to remove |
companyUuid | uuid | β No | Optional company UUID |
{
"callbackUrl": "https://example.com/my/webhook/endpoint",
"event": "CARD_CREATION_REQUEST_CREATED"
}
Status | Meaning |
---|
204 | Event removed |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
DELETE /api/v1/subscribers/{uuid}
Field | Type | Required | Description |
---|
companyUuid | uuid | β No | Optional company UUID |
{
"companyUuid": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed"
}
Status | Meaning |
---|
204 | Subscriber deleted |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |