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

# Create a webhook endpoint

> Registers an HTTPS endpoint to receive signed events. The signing `secret` is returned ONCE in this response and never again.

Register an HTTPS URL to receive signed events when generations reach a terminal state. See [Webhooks](/api-reference/webhooks) for the event payload shape and signature verification.

<Warning>
  The response includes the signing **`secret`** — shown **once**. Store it securely before discarding the response.
</Warning>


## OpenAPI

````yaml POST /v1/webhook-endpoints
openapi: 3.1.0
info:
  title: Selektable API
  version: 1.0.0
  description: >-
    Generate AI product visualizations from a customer photo. Two modes are
    supported: `virtual-try-on` (fashion) and `room-visualizer` (interior).
    Generations are asynchronous: subscribe a webhook endpoint (recommended) or
    poll the generation.
  contact:
    name: Selektable Support
    url: https://selektable.com
servers:
  - url: https://app.selektable.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Generations
    description: Create and retrieve AI visualizations
  - name: Webhook Endpoints
    description: Manage outgoing webhook destinations
paths:
  /v1/webhook-endpoints:
    post:
      tags:
        - Webhook Endpoints
      summary: Create a webhook endpoint
      description: >-
        Registers an HTTPS endpoint to receive signed events. The signing
        `secret` is returned ONCE in this response and never again.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWebhookEndpointRequest'
      responses:
        '201':
          description: Endpoint created (includes one-time secret)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookEndpointWithSecret'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
components:
  schemas:
    CreateWebhookEndpointRequest:
      type: object
      required:
        - url
      properties:
        url:
          type: string
          format: uri
          description: HTTPS destination URL.
        description:
          type: string
          maxLength: 200
        enabledEvents:
          type: array
          items:
            type: string
            enum:
              - '*'
              - generation.completed
              - generation.failed
          default:
            - '*'
    WebhookEndpointWithSecret:
      allOf:
        - $ref: '#/components/schemas/WebhookEndpoint'
        - type: object
          properties:
            secret:
              type: string
              example: whsec_...
              description: Signing secret. Shown only once — store it securely.
    WebhookEndpoint:
      type: object
      properties:
        id:
          type: string
          example: whe_abc123
        object:
          type: string
          enum:
            - webhook_endpoint
        url:
          type: string
          format: uri
        description:
          type:
            - string
            - 'null'
        enabledEvents:
          type: array
          items:
            type: string
        status:
          type: string
          enum:
            - enabled
            - disabled
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - authentication_error
                - authorization_error
                - invalid_request_error
                - rate_limit_error
                - not_found_error
                - conflict_error
                - api_error
            code:
              type: string
            message:
              type: string
            param:
              type: string
  responses:
    Error:
      description: Error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your Selektable API key (`selektable_...`), sent as `Authorization:
        Bearer <key>`.

````