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

# Change a webhook's events

> Replaces the webhook's events with this full list (at least one; repeats are removed). Only the events change: the link, the secret and whether it is on stay as they are. Events already queued are still sent; new events follow the new list from now. To change the link, add a new webhook and delete this one.

Permission: A Full key.



## OpenAPI

````yaml /openapi.json patch /v1/webhooks/{id}
openapi: 3.1.0
info:
  title: GetReply API
  version: 1.0.0
  description: >-
    Send WhatsApp messages, templates, OTPs and campaigns from your own
    software. Every request needs an API key (Developer → API keys) as a Bearer
    token.


    Requests sent here are real and charged like any other.
servers:
  - url: https://api.getreply.in
    description: GetReply
security:
  - bearerAuth: []
tags:
  - name: Account
  - name: Messages
  - name: Templates
  - name: Contacts
  - name: Inbox
  - name: Campaigns
  - name: Webhooks
  - name: Request log
paths:
  /v1/webhooks/{id}:
    patch:
      tags:
        - Webhooks
      summary: Change a webhook's events
      description: >-
        Replaces the webhook's events with this full list (at least one; repeats
        are removed). Only the events change: the link, the secret and whether
        it is on stay as they are. Events already queued are still sent; new
        events follow the new list from now. To change the link, add a new
        webhook and delete this one.


        Permission: A Full key.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: The id.
        - name: Idempotency-Key
          in: header
          required: false
          description: >-
            Your own unique id for this request (at most 255 characters). The
            same id and body within 24 hours answers the first answer again —
            never a second send or charge.
          schema:
            type: string
            maxLength: 255
          example: webhook-events-2
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - events
              properties:
                events:
                  type: array
                  minItems: 1
                  items:
                    type: string
                    enum:
                      - message.accepted
                      - message.sent
                      - message.delivered
                      - message.read
                      - message.failed
                      - message.received
                      - message.sent_from_phone
                      - wallet.low
                      - number.quality_changed
                      - number.status_changed
                      - number.name_changed
                      - template.status_changed
                      - template.quality_changed
                      - template.created
                      - template.deleted
                      - campaign.started
                      - campaign.finished
                      - campaign.paused
                      - campaign.stopped
                      - plan.ended
                      - key.disabled
                      - daily_limit.reached
                      - webhook.disabled
            example:
              events:
                - message.delivered
                - message.read
                - message.received
      responses:
        '200':
          description: The webhook (never the secret).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
              example:
                id: string
                url: string
                events:
                  - string
                status: 'ON'
                created_at: string
        '400':
          description: 'validation_error: Some fields are missing or wrong.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                validation_error:
                  value:
                    error:
                      code: validation_error
                      message: Some fields are missing or wrong.
        '401':
          description: 'unauthorized: API key is missing or not valid.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                unauthorized:
                  value:
                    error:
                      code: unauthorized
                      message: API key is missing or not valid.
        '403':
          description: >-
            key_off: This API key is switched off. · forbidden_scope: This API
            key isn't allowed to do this. · ip_not_allowed: Requests from this
            IP address aren't allowed for this key. · needs_pro_plan: The API
            needs the Pro plan. · plan_ended: Your plan has ended. Renew it to
            send messages.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                key_off:
                  value:
                    error:
                      code: key_off
                      message: This API key is switched off.
                forbidden_scope:
                  value:
                    error:
                      code: forbidden_scope
                      message: This API key isn't allowed to do this.
                ip_not_allowed:
                  value:
                    error:
                      code: ip_not_allowed
                      message: >-
                        Requests from this IP address aren't allowed for this
                        key.
                needs_pro_plan:
                  value:
                    error:
                      code: needs_pro_plan
                      message: The API needs the Pro plan.
                plan_ended:
                  value:
                    error:
                      code: plan_ended
                      message: Your plan has ended. Renew it to send messages.
        '404':
          description: 'not_found: Not found.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                not_found:
                  value:
                    error:
                      code: not_found
                      message: Not found.
        '409':
          description: >-
            request_id_reused: This request ID was already used for a different
            request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                request_id_reused:
                  value:
                    error:
                      code: request_id_reused
                      message: >-
                        This request ID was already used for a different
                        request.
        '429':
          description: 'rate_limited: Too many requests. Try again in a few seconds.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                rate_limited:
                  value:
                    error:
                      code: rate_limited
                      message: Too many requests. Try again in a few seconds.
        '500':
          description: 'server_error: Something went wrong on our side. Try again.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                server_error:
                  value:
                    error:
                      code: server_error
                      message: Something went wrong on our side. Try again.
components:
  schemas:
    Webhook:
      type: object
      properties:
        id:
          type: string
        url:
          type: string
        events:
          type: array
          items:
            type: string
        status:
          type: string
          enum:
            - 'ON'
            - 'OFF'
        created_at:
          type:
            - string
            - 'null'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
            field:
              type: string
              description: >-
                The one field that is wrong, when there is one: its path in your
                request, 0-based for lists, e.g. buttons[0].phone, header.text,
                audience.numbers[12].to.
              example: buttons[0].phone
            reason:
              type: string
              description: >-
                validation_error only: what is wrong with that field, in plain
                words, when we have words for that check. Left out otherwise.
              example: Add a valid phone number.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Your API key, e.g. gr_live_…

````

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