v1

latestOpenAPI 3.0.1MIT2026-07-2638658.5 KB
Webhook

Add Webhook Endpoint

Create a new webhook endpoint to receive event notifications. You can specify which events to subscribe to and configure the endpoint URL.

post/v2/endpoint

Request body

urlstring uri required

Webhook endpoint URL that will receive POST requests

status'enabled' | 'disabled' required

Initial status of the webhook

eventsstring[] required

List of event types to subscribe to

Example request

{
  "url": "https://your-domain.com/webhook",
  "status": "enabled",
  "events": [
    "generated_avatar_video_success",
    "generated_avatar_video_failed"
  ]
}

Response

Success

codeinteger required

Business status code:

  • 0 - Success
  • 10104 - Record not found
  • 10105 - Invalid API key
  • 18020 - Insufficient credit
  • 18025 - No permission to call APIs
  • 40000 - Parameter error
  • 50000 - System error
msgstring required

Response message

Example response

{
  "msg": "Success",
  "data": {
    "endpoint_id": "wh_123456789",
    "url": "https://your-domain.com/webhook",
    "secret": "whsec_abc123xyz",
    "status": "enabled",
    "events": [
      "generated_avatar_video_success",
      "generated_avatar_video_failed"
    ],
    "username": "johndoe",
    "created_at": 1732806631
  }
}