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

# Create Webhook

> Create a webhook endpoint. The signing secret is returned in full here and never again — store it.



## OpenAPI

````yaml https://api.useinvent.com/openapi.json post /orgs/{org_id}/webhooks
openapi: 3.1.0
info:
  version: 1.0.0
  title: Invent API
servers:
  - url: https://api.useinvent.com
security:
  - bearerAuth: []
paths:
  /orgs/{org_id}/webhooks:
    post:
      tags:
        - Orgs Webhooks
      summary: Create Webhook
      description: >-
        Create a webhook endpoint. The signing secret is returned in full here
        and never again — store it.
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the org
          name: org_id
          in: path
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrgWebhookSchema'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CreateOrgWebhookSchema'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgWebhookSchema'
components:
  schemas:
    CreateOrgWebhookSchema:
      type: object
      properties:
        url:
          type: string
          maxLength: 2048
          format: uri
          description: HTTPS endpoint that receives the events
        events:
          type: array
          items:
            $ref: '#/components/schemas/OrgWebhookSubscribableEventIdSchema'
          minItems: 1
          description: Events to subscribe to
        name:
          type: string
          minLength: 1
          maxLength: 64
        enabled:
          type: boolean
      required:
        - url
        - events
        - name
    OrgWebhookSchema:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        url:
          type: string
        events:
          type: array
          items:
            $ref: '#/components/schemas/OrgWebhookSubscribableEventIdSchema'
        enabled:
          type: boolean
        secret:
          type:
            - string
            - 'null'
          description: >-
            Signing secret. Returned in full on create and rotate only; masked
            afterwards.
        disabled_reason:
          type:
            - string
            - 'null'
          description: Why the endpoint was disabled automatically, if it was
        consecutive_failures:
          type: number
        last_delivery_at:
          type:
            - string
            - 'null'
          format: date-time
        last_success_at:
          type:
            - string
            - 'null'
          format: date-time
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - name
        - url
        - events
        - enabled
        - secret
        - disabled_reason
        - consecutive_failures
        - last_delivery_at
        - last_success_at
        - created_at
        - updated_at
      description: A webhook endpoint
    OrgWebhookSubscribableEventIdSchema:
      type: string
      enum:
        - chat.assigned
        - contact.blocked
        - contact.unsubscribed
        - broadcast.failed
        - broadcast.bounced
        - broadcast.complained
        - broadcast.suppressed
      description: An event an endpoint can subscribe to
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Bearer token authentication using your API key

````