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

# Create Webhook

> Add a webhook to a WhatsApp instance with its API token, so your app or an automation tool can register its own URL.

Add a webhook to this instance from code. It's the same webhook you can create in the dashboard: Hypersender sends the events you choose to the URL, with the [same payloads](https://docs.hypersender.com/v2/api-reference/whatsapp-webhooks/whatsapp-webhooks-introduction.md).

Tools such as the n8n Hypersender Trigger use this to register their URL when a workflow is turned on, and [delete it](https://docs.hypersender.com/v2/api-reference/whatsapp/webhooks/delete-webhook.md) when it's turned off.

* `events` takes one or more event names, for example `message.any`. Events this instance type doesn't send are rejected.
* Set `authorization_secret` to a long random value. Hypersender sends it unchanged in the `Authorization` header, so your endpoint can reject requests that don't have it. It's stored encrypted, and no endpoint returns it.
* Each webhook counts toward your plan's webhook limit. Over the limit, you get a `403` with the reason.


## OpenAPI

````yaml v2/api-reference/whatsapp/whatsapp-collection.json POST /{instance}/webhooks
openapi: 3.1.0
info:
  version: v2.0
  title: Hypersender WhatsApp API Docs
  description: >

    The Hypersender WhatsApp API is a powerful api to send and recieve messages
    using your own whatsapp number.

    Without the high costs of Meta's Whatsapp business API.


    In this Docs you'll learn how to use and integrate Hypersnder Whatsapp API
    into your existing system/service or application using simple API endpoints.


    ## What's New in V2?


    **Queued Responses:** All requests in V2 are now queued for improved
    reliability and performance. When you make a request, you'll receive an
    immediate response with a `queued_request_uuid` that you can use to check
    the status of your request.


    **Example Response:**

    ```json

    {
        "queued": true,
        "message": "Processing your request...",
        "queued_request_uuid": "a0816120-7e37-4e8b-8cf3-92deb2cdc133",
        "queued_request_link": "https://app.hypersender.com/api/whatsapp/v2/{instance}/queued-requests/{queued_request_uuid}"
    }

    ```


    Use the `queued_request_link` or the **Get Queued Request** endpoint to
    check the actual message response once it's processed.


    **What you can Do?**


    - Send Text and basic Url messages.

    - Send Media through Link or uploaded file.

    - Send Audio through Link or uploaded file.

    - Send Contact Card

    - Send Location

    - Send Poll votes


    **You can also**


    - React to a message

    - Forward messages to other chats

    - Acknowledge messages (mark as read)

    - Star and unstar messages



    <hr />


    **Quick Demo**

      **Learn how to use Hypersender whatsapp API to send a message using Postman:**
      [Demo Link](https://app.hypersender.com/send-whatsapp-message-in-postman) **to easily interact with our API.**

    <hr />


    **postman collection**


    You can download our [Postman
    Collection](https://docs.hypersender.com/whatsapp-postman-collection.json)
    to easily interact with our API.


    ## Servers (Endpoints)


    - Production (activated):
    [https://app.hypersender.com/api/whatsapp/v2](https://app.hypersender.com/api/whatsapp/v2)
servers:
  - url: https://app.hypersender.com/api/whatsapp/v2
    description: Production
security:
  - Authorization: []
paths:
  /{instance}/webhooks:
    post:
      tags:
        - Webhooks
      summary: Create Webhook
      description: Add a webhook to this instance. Counts toward your plan's webhook limit.
      parameters:
        - name: Accept
          in: header
          schema:
            type: string
          example: application/json
        - name: instance
          in: path
          description: Instance ID from the Hypersender dashboard.
          required: true
          schema:
            type: string
            example: '{{ instance_id }}'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - url
                - events
              properties:
                url:
                  type: string
                  maxLength: 255
                  description: Where Hypersender sends the events.
                  example: https://example.com/hypersender
                events:
                  type: array
                  minItems: 1
                  items:
                    type: string
                    enum:
                      - message.any
                      - message.ack
                      - message.waiting
                      - message.revoked
                      - messages.reaction
                      - presence.update
                      - poll.vote
                      - poll.vote.failed
                  description: Events to send to this URL.
                  example:
                    - message.any
                name:
                  type: string
                  maxLength: 100
                  description: >-
                    A name to recognise the webhook in the dashboard. Default
                    `API webhook`.
                  example: n8n
                authorization_secret:
                  type: string
                  maxLength: 512
                  description: >-
                    Sent unchanged in the `Authorization` header of every
                    webhook, so your endpoint can reject requests that are not
                    from Hypersender. Stored encrypted and never returned.
                  example: a-long-random-secret
      responses:
        '201':
          description: The webhook was created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 42
                      name:
                        type: string
                        example: n8n
                      url:
                        type: string
                        example: https://example.com/hypersender
                      events:
                        type: array
                        items:
                          type: string
                          enum:
                            - message.any
                            - message.ack
                            - message.waiting
                            - message.revoked
                            - messages.reaction
                            - presence.update
                            - poll.vote
                            - poll.vote.failed
                        example:
                          - message.any
                      enabled:
                        type: boolean
                        example: true
                      has_authorization_secret:
                        type: boolean
                        example: true
                        description: >-
                          Whether an Authorization Secret is set. The secret
                          itself is never returned.
                      created_at:
                        type: string
                        format: date-time
                        example: '2026-11-27T18:00:00+00:00'
        '401':
          description: The Bearer token is missing, invalid, or expired.
          content:
            application/json:
              example:
                message: >-
                  The Bearer token is not valid please check the token and try
                  again.
        '403':
          description: >-
            The token belongs to another instance, or the instance is of another
            type.
          content:
            application/json:
              example:
                message: The Bearer token does not have access to this instance.
        '422':
          description: >-
            A field is missing or not valid, such as an event this instance type
            doesn't send.
          content:
            application/json:
              example:
                message: The selected events.0 is invalid.
components:
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.