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

# Create webhook

> Register a webhook endpoint. The signing secret is returned exactly once.



## OpenAPI

````yaml https://api.gleap.io/api-docs.json post /s2s/webhooks
openapi: 3.0.0
info:
  title: gleap-server
  version: 14.0.0
  contact: {}
servers:
  - url: https://api.gleap.io/v3
security: []
paths:
  /s2s/webhooks:
    post:
      tags:
        - S2S Webhooks
      summary: Create webhook
      description: >-
        Register a webhook endpoint. The signing secret is returned exactly
        once.
      operationId: Create
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/S2SWebhookCreateBody'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/S2SWebhookListItem'
      security:
        - s2s: []
components:
  schemas:
    S2SWebhookCreateBody:
      properties:
        url:
          type: string
        events:
          items:
            type: string
          type: array
          description: Event types to deliver; omit for all.
        description:
          type: string
      required:
        - url
      type: object
      additionalProperties: false
    S2SWebhookListItem:
      properties:
        id:
          type: string
        url:
          type: string
        enabled:
          type: boolean
        events:
          items:
            type: string
          type: array
        description:
          type: string
        secret:
          type: string
          description: Masked; the full secret is returned once at creation.
        createdAt:
          type: string
          format: date-time
      required:
        - id
        - url
        - enabled
        - events
        - secret
        - createdAt
      type: object
      additionalProperties: false
  securitySchemes:
    s2s:
      type: http
      scheme: bearer
      bearerFormat: Service account token (JWT)

````