Add a Webhook Endpoint

POSThttps://api.konpro.ai/v1/webhook/endpoint.add

Register 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

TIMESTATUSUSER 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

FieldTypeDescription
urlstringThe HTTPS URL where webhook event notifications will be sent. Must support SSL security level 2 or higher.
eventsarray[string]List of event types that your endpoint should receive. Use None or an empty list to subscribe to all events.
entity_idstring (optional)Specific entity ID to filter events (e.g., video_id, project_id)

Response

Response Structure

FieldTypeDescription
endpoint_idstringUnique identifier of the registered webhook endpoint
urlstringURL of the registered webhook endpoint
secretstringSecret token used to verify webhook callback authenticity
statusstringCurrent status of the webhook endpoint (enabled/disabled)
eventsarray[string]List of subscribed events
usernamestringUsername associated with the webhook endpoint
created_atdatetimeTimestamp 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