Add a Webhook Endpoint
POST
https://api.konpro.ai/v1/webhook/endpoint.addRegister a new webhook endpoint to receive real-time event notifications from KonPro, enabling you to automate workflows. The system will validate your endpoint by sending an OPTIONS request with a 1-second timeout, so ensure your server handles OPTIONS requests promptly.
Request History
Log in to see full request history
| TIME | STATUS | USER AGENT |
|---|---|---|
| Make a request to see history. | ||
0 Requests This Month
cURL Request
shell
curl --request POST \
--url https://api.konpro.ai/v1/webhook/endpoint.add \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-api-key: <your-api-key>' \
--data '{
"url": "https://example.com/konpro/webhooks",
"events": ["video.created", "avatar.updated"],
"entity_id": "project123"
}'Request Body Parameters
| Field | Type | Description |
|---|---|---|
| url | string | The HTTPS URL where webhook event notifications will be sent. Must support SSL security level 2 or higher. |
| events | array[string] | List of event types that your endpoint should receive. Use None or an empty list to subscribe to all events. |
| entity_id | string (optional) | Specific entity ID to filter events (e.g., video_id, project_id) |
Response
Response Structure
| Field | Type | Description |
|---|---|---|
| endpoint_id | string | Unique identifier of the registered webhook endpoint |
| url | string | URL of the registered webhook endpoint |
| secret | string | Secret token used to verify webhook callback authenticity |
| status | string | Current status of the webhook endpoint (enabled/disabled) |
| events | array[string] | List of subscribed events |
| username | string | Username associated with the webhook endpoint |
| created_at | datetime | Timestamp of when the endpoint was created |
Sample Response
json
{
"endpoint_id": "webhook_123456",
"url": "https://example.com/konpro/webhooks",
"secret": "whsec_abc123def456",
"status": "enabled",
"events": ["video.created", "avatar.updated"],
"username": "user123",
"created_at": "2024-01-15T10:30:00Z"
}Notes
- Requires API authentication.
- Endpoint URL must use HTTPS with SSL security level 2 or higher.
- Server must handle OPTIONS requests with 1-second timeout for validation.
- Events array can be empty to subscribe to all events.
- Entity ID is optional for filtering events to specific resources.
- Secret token is generated for webhook verification.
- Endpoint is created in enabled status by default.
- Refer to Error Responses for error information.
Example Usage
Shell
curl --request POST \
--url https://api.konpro.ai/v1/webhook/endpoint.add \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-api-key: <your-api-key>' \
--data '{
"url": "https://example.com/konpro/webhooks",
"events": ["video.created", "avatar.updated"],
"entity_id": "project123"
}'LANGUAGE
CREDENTIALS
HEADER
RESPONSE
Examples
Choose an example:
application/json
201 - Created
400 - Bad Request
LANGUAGE
CREDENTIALS
HEADER
RESPONSE
Examples
Choose an example:
application/json
201 - Created
400 - Bad Request