webhook.config.create
Create a new webhook endpoint configuration.
POST http://api.kompliant.com/webhook.config.create (OpenAPI specification)
Usage Info
This method creates a new webhook URL configuration for an account. Webhook configurations define the HTTPS endpoint where Kompliant will deliver encrypted webhook payloads. Each account can have up to 20 active configurations.
Configurations are identified using a whc_ prefixed ID (e.g., whc_2K9mPxR7N4jL8hS6TdWfY3). Each URL must be unique per account — attempting to add the same URL twice will result in a SYSTEM_RULE_VIOLATION error.
Request
Authentication: KSig1-HMAC-SHA256
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| account_id | string | Yes | The account identifier to create the webhook configuration for. |
| config | object | Yes | The config parameter defined in the table below. |
Config Parameters
| Type | Parameter | Required | Description |
|---|---|---|---|
| url | string | Yes | The new HTTPS endpoint URL to deliver webhook payloads to. Must start with https://. |
Example
{
"account_id": "account_id",
"config": {
"url": "https://example.com/webhooks/kompliant"
}
}
Response
Data
| Parameter | Type | Description |
|---|---|---|
| config_id | string | The identifier for the webhook configuration (format: whc_...). |
Example
{
"meta": {
"status": "SUCCESS",
"trace_id": "trc_3OwNmn7AgCvLGqeCIjKjSD",
"version": "2025-03-24"
},
"data": {
"config_id": "whc_2K9mPxR7N4jL8hS6TdWfY3"
}
}
Errors
| Error Code | HTTP Code | Possible Cause |
|---|---|---|
| BAD_REQUEST | 400 | Required parameters not provided. URL does not start with https://. |
| ENTITY_NOT_FOUND | 400 | The account_id provided does not exist. |
| SYSTEM_RULE_VIOLATION | 400 | System rule violations are described below. |
System Rule Violations
When a SYSTEM_RULE_VIOLATION error occurs, the response will include additional entity_type and sub_code fields to provide more specific information:
| Entity Type | Sub-code | Description |
|---|---|---|
| Webhook Config | MAX_WEBHOOK_URL_LIMIT | The maximum number of configurations (20) has been reached for this account. |
| Webhook Config | URL_ALREADY_EXISTS | A webhook configuration with this URL already exists for this account. |
Updated 28 days ago