> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jogg.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Add a Webhook Endpoint

> Add a new webhook endpoint configuration



## OpenAPI

````yaml POST /endpoint
openapi: 3.0.1
info:
  title: OpenAPI Render API
  description: A sample API that demonstrates features in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.jogg.ai/v1
security:
  - apiKeyAuth: []
tags:
  - name: Create Video from URL
    description: |-



      Product video generation workflow:



        1. First call POST /product to crawl product information



        2. Optionally call PUT /product to modify product details using the product_id from step 1



        3. Finally call POST /create_video_from_url to generate video using the product_id from step 1
  - name: Webhook
    description: Webhook configuration and management
paths:
  /endpoint:
    post:
      tags:
        - Webhook
      summary: Add webhook endpoint
      description: Add a new webhook endpoint configuration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - url
                - events
              properties:
                url:
                  type: string
                  description: Webhook endpoint URL (must be HTTPS)
                  example: https://example.com/webhook
                events:
                  type: array
                  description: List of events to subscribe to
                  items:
                    type: string
                    enum:
                      - generated_video_success
                      - generated_video_failed
                  example:
                    - generated_video_success
                  default: []
                status:
                  type: string
                  enum:
                    - enabled
                    - disabled
                  default: enabled
                  description: Webhook status
                  example: enabled
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  endpoint_id:
                    type: string
                    description: Unique identifier for the webhook
                    example: b1ac30a401234c96ad128303dfb431e2
                  url:
                    type: string
                    description: Webhook URL
                    example: https://example.com/webhook
                  secret:
                    type: string
                    description: Secret for signature verification
                    example: your-secret-key
                  status:
                    type: string
                    description: Current webhook status
                    example: enabled
                  events:
                    type: array
                    items:
                      type: string
                    description: List of subscribed events
                    example:
                      - generated_video_success
                  username:
                    type: string
                    description: Username
                    example: jogg@gmail.com
                  created_at:
                    type: integer
                    description: Creation timestamp (Unix timestamp)
                    example: 1703894400
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````