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

# Subscribe a webhook

> Subscribe an endpoint to supported events from this Presenton instance.

[Read the async and webhooks guide](/user-guide/api-and-automation/async-and-webhooks).



## OpenAPI

````yaml /archive/v0.9.0-beta/openapi/self-hosted.json post /api/v1/webhook/subscribe
openapi: 3.1.0
info:
  title: Presenton Self-hosted API
  version: v0.9.0-beta
  description: Supported public API served by a self-hosted Presenton deployment.
servers:
  - url: http://localhost:5001
    description: Local self-hosted instance
security: []
tags:
  - name: Presentations
    description: Generate and manage presentations.
  - name: Files and media
    description: Upload source files and images.
  - name: Templates and design
    description: Select reusable presentation designs.
  - name: Async and webhooks
    description: Monitor background work and receive events.
paths:
  /api/v1/webhook/subscribe:
    post:
      tags:
        - Webhook
      summary: Subscribe a webhook
      description: >-
        Subscribe an endpoint to supported events from this Presenton instance.


        [Read the async and webhooks
        guide](/user-guide/api-and-automation/async-and-webhooks).
      operationId: subscribe_to_webhook_api_v1_webhook_subscribe_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscribeToWebhookRequest'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscribeToWebhookResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          $ref: '#/components/responses/ServerError'
      security:
        - BasicAuth: []
      externalDocs:
        description: Read the async and webhooks guide
        url: /user-guide/api-and-automation/async-and-webhooks
components:
  schemas:
    SubscribeToWebhookRequest:
      properties:
        url:
          type: string
          title: Url
          description: The URL to send the webhook to
        secret:
          anyOf:
            - type: string
            - type: 'null'
          title: Secret
          description: The secret to use for the webhook
        event:
          $ref: '#/components/schemas/WebhookEvent'
          description: The event to subscribe to
      type: object
      required:
        - url
        - event
      title: SubscribeToWebhookRequest
    SubscribeToWebhookResponse:
      properties:
        id:
          type: string
          title: Id
      type: object
      required:
        - id
      title: SubscribeToWebhookResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    WebhookEvent:
      type: string
      enum:
        - presentation.generation.completed
        - presentation.generation.failed
      title: WebhookEvent
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  responses:
    Unauthorized:
      description: Authentication is missing or invalid.
    ServerError:
      description: Presenton or one of its configured dependencies failed.
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic

````