KonPro's Webhook Events
Receive real-time notifications for avatar video events
Welcome to Webhook Events! 🔔
Webhook events are how KonPro notifies your endpoints when a variety of interactions or events happen, including when avatar video processing succeeds or fails. Webhook events are sent by KonPro as POST requests to your webhook endpoint.
Getting Started
List Available Webhook Events
Let's quickly get started with webhooks by listing all available webhook events in KonPro API.
curl --request GET \
--url https://api.konpro.ai/v1/webhook/webhook.list \
--header 'accept: application/json' \
--header 'x-api-key: <your-api-key>'Basically, KonPro can make requests to your endpoint when 'Video succeeds' and 'Video fails'.
Payloads Your Endpoint Will Receive
Your endpoint receives the following payloads:
Event Types
avatar_video.successavatar_video.failvideo_translate.successvideo_translate.failpersonalized_video
{
"event_type": "avatar_video.success",
"event_data": {
"video_id": "<video_id>",
"url": "<video_url>",
"gif_download_url": "<gif_url>",
"video_share_page_url": "<share_page_url>",
"folder_id": "<folder_id>",
"callback_id": "<callback_id>"
}
}avatar_video_gif payload is the same as avatar_video.
Register a Webhook Endpoint
Use add a webhook endpoint to register your endpoint which is used to process KonPro events. events are the events you want to process.
curl --location 'https://api.konpro.ai/v1/webhook/endpoint.add' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <your-api-key>' \
--data '
{
"url": "<your-endpoint>",
"events": ["avatar_video.success"]
}'Important
Our webhook validation performs an OPTIONS request to your endpoint with a 1-second timeout, so ensure your server responds quickly and accepts OPTIONS requests, even if your main functionality uses different HTTP methods.
List Registered Webhook Endpoints
You can use this endpoint to list your registered endpoints.
curl -XGET https://api.konpro.ai/v1/webhook/endpoint.list
-H 'Accept: application/json'
-H 'x-api-key: <your-api-key>'Update a Registered Webhook Endpoint
Use update a webhook endpoint to update the information of a registered endpoint.
curl -XPATCH https://api.konpro.ai/v1/webhook/endpoint.update
-H 'Content-Type: application/json'
-H 'x-api-key: <your-api-key>'
-d '
{
"endpoint_id": "<endpoint_id>",
"url": "<updated-url>",
"events": ["avatar_video.fail"]
}'Delete a Registered Webhook Endpoint
Use delete a webhook endpoint to delete a registered endpoint.
curl --location --request DELETE 'https://api.konpro.ai/v1/webhook/endpoint.delete?endpoint_id=<endpoint_id>' \ --header 'accept: application/json' \ --header 'x-api-key: <your-api-key>'
Let's Build Our Own Endpoint App
We will create a simple endpoint with Python and Flask, then we will expose this local webhook endpoint to the internet, then we will register it to KonPro webhook events and start receiving video information to our endpoint. Follow up! 🙌
Next Steps
Check out our detailed guide on "Write Your Endpoint To Process Webhook Events" to learn how to build a complete webhook endpoint application.
Conclusion
KonPro's webhook events and APIs provide essential tools for managing avatar video generation. With options to register, update, and process events you can effortlessly stay informed about the status of your avatar videos. Whether you want to handle successful video generation or address any issues that may arise, KonPro's webhook system keeps you in the loop.