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

# Create Webhook

> Creates a new webhook by adding the webhook event type and webhook URL. 

For details on using webhooks in the SendLayer app, see our guide to [managing webhooks](https://sendlayer.com/docs/managing-webhooks/).



## OpenAPI

````yaml api-reference/sendlayer.json post /webhooks
openapi: 3.0.3
info:
  title: SendLayer API
  version: 1.0.1
  description: >-
    Welcome to the SendLayer API! To learn how to access your SendLayer API key,
    check out our tutorial on <a
    href="https://sendlayer.com/docs/managing-api-keys/" title="Managing API
    Keys">managing API keys</a>. <br/><br/> For a quick introduction to sending
    emails, see our guide to <a
    href="https://sendlayer.com/docs/getting-started-with-the-sendlayer-api/"
    title="Getting Started With the SendLayer API">getting started with the
    SendLayer API</a>.<br/><br/><strong>Need help?</strong> <a
    href="https://sendlayer.com/contact/" title="SendLayer Support Page">Contact
    the SendLayer support team</a>
  contact:
    name: SendLayer Support
    url: https://sendlayer.com/contact
    email: support@sendlayer.com
servers:
  - url: https://console.sendlayer.com/api/v1
security:
  - bearerAuth: []
tags:
  - name: Email
    description: Operations related to email sending
  - name: Events
    description: Operations related to retrieving email events
  - name: Webhooks
    description: Operations related to creating and managing webhooks
paths:
  /webhooks:
    post:
      tags:
        - Webhooks
      summary: Add a new webhook
      description: >-
        Creates a new webhook by adding the webhook event type and webhook URL. 


        For details on using webhooks in the SendLayer app, see our guide to
        [managing webhooks](https://sendlayer.com/docs/managing-webhooks/).
      requestBody:
        description: >-
          Below is the JSON payload required for creating a new webhook. Be sure
          to replace the example URL with your webhook URL and choose a valid
          webhook event from the following options: `bounce`,`click`, `open`,
          `unsubscribe`, `complaint`, `delivery`.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookRequestBody'
      responses:
        '200':
          description: |-
            OK 

            A successfully created webhook returns the `NewWebhookID`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostWebhooksResponse'
components:
  schemas:
    WebhookRequestBody:
      title: POST webhook request body
      type: object
      properties:
        Event:
          type: string
          example: delivery
        WebhookURL:
          type: string
          example: www.example.com
    PostWebhooksResponse:
      title: POST webhooks response
      description: A successfully created webhook returns the NewWebhookID
      type: object
      properties:
        NewWebhookID:
          type: integer
          example: 972
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````