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

# Create Webhook Endpoint

> Register a webhook endpoint and return its signing secret ONCE.

The URL is SSRF-validated (https-only; internal hosts rejected). The
signing secret is generated server-side and returned only in this
response — it can never be retrieved again.



## OpenAPI

````yaml /api-reference/openapi.json post /webhook-endpoints
openapi: 3.1.0
info:
  description: >-
    Submit loan packages for automated quality-control review and retrieve
    results. Authenticate every request with your organization's API key:
    `Authorization: Bearer <key>`.
  title: Flightline Public API
  version: '2026-05-30'
servers:
  - url: https://api.flightlinehq.com/v1
security: []
paths:
  /webhook-endpoints:
    post:
      tags:
        - webhooks
      summary: Create Webhook Endpoint
      description: |-
        Register a webhook endpoint and return its signing secret ONCE.

        The URL is SSRF-validated (https-only; internal hosts rejected). The
        signing secret is generated server-side and returned only in this
        response — it can never be retrieved again.
      operationId: create_webhook_endpoint_webhook_endpoints_post
      parameters:
        - in: header
          name: authorization
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - in: header
          name: X-Api-Key
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWebhookEndpointRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookEndpointCreated'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    CreateWebhookEndpointRequest:
      additionalProperties: false
      description: Body for ``POST /webhook-endpoints``.
      properties:
        description:
          anyOf:
            - maxLength: 500
              type: string
            - type: 'null'
          title: Description
        url:
          description: HTTPS URL Flightline will POST signed event notifications to.
          maxLength: 4000
          minLength: 1
          title: Url
          type: string
      required:
        - url
      title: CreateWebhookEndpointRequest
      type: object
    WebhookEndpointCreated:
      additionalProperties: false
      description: |-
        The ``POST /webhook-endpoints`` response.

        Extends the resource with the full ``signing_secret`` — returned exactly
        once, at creation, and never retrievable again.
      properties:
        created_at:
          format: date-time
          title: Created At
          type: string
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        enabled:
          title: Enabled
          type: boolean
        id:
          format: uuid
          title: Id
          type: string
        secret_hint:
          description: >-
            Masked tail of the signing secret, e.g. 'whsec_…a1b2'. Not the
            secret.
          title: Secret Hint
          type: string
        signing_secret:
          description: >-
            The signing secret. Shown once — store it now; it cannot be
            retrieved later.
          title: Signing Secret
          type: string
        url:
          title: Url
          type: string
      required:
        - id
        - url
        - enabled
        - secret_hint
        - created_at
        - signing_secret
      title: WebhookEndpointCreated
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````