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

# Update API webhook



## OpenAPI

````yaml /api-reference/openapi-v3.json put /api_webhooks/{webhookId}
openapi: 3.1.0
info:
  title: Heyy API
  version: 3.0.0
servers:
  - url: https://api.heyy.io/v3
security:
  - bearerAuth: []
paths:
  /api_webhooks/{webhookId}:
    put:
      summary: Update API webhook
      parameters:
        - name: webhookId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                  enum:
                    - active
                    - inactive
                url:
                  type: string
                  format: uri
                events:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - message.received
                          - message.sent
                          - message.updated
                          - whatsapp_message_received
                          - whatsapp_message_status
                      scopes:
                        type: array
                        items:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - channel
                            ids:
                              type: array
                              items:
                                type: string
                          required:
                            - type
                            - ids
                    required:
                      - type
                      - scopes
              additionalProperties: false
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: object
                    properties:
                      url:
                        type: string
                      status:
                        type: string
                        enum:
                          - active
                          - inactive
                      events:
                        type: array
                        items:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - message.received
                                - message.sent
                                - message.updated
                                - whatsapp_message_received
                                - whatsapp_message_status
                            scopes:
                              type: array
                              items:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - channel
                                  ids:
                                    type: array
                                    items:
                                      type: string
                                required:
                                  - type
                                  - ids
                          required:
                            - type
                            - scopes
                      id:
                        type: string
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                    required:
                      - url
                      - status
                      - events
                      - id
                      - createdAt
                      - updatedAt
                    additionalProperties: false
                required:
                  - success
                  - data
                additionalProperties: false
              example:
                success: true
                data:
                  url: string
                  status: active
                  events: []
                  id: string
                  createdAt: '2024-01-01T00:00:00.000Z'
                  updatedAt: '2024-01-01T00:00:00.000Z'
        '400':
          description: Bad request. The request body or parameters are invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      messageKey:
                        type: string
                      message:
                        type: string
                      invalidParams:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            key:
                              type: string
                            message:
                              type: string
                          required:
                            - key
                            - message
                required:
                  - success
                additionalProperties: false
              example:
                success: false
                error:
                  messageKey: invalid_body_params
                  message: Invalid body params
                  invalidParams:
                    email:
                      key: invalid_string
                      message: Invalid email
        '401':
          description: Unauthorized. A valid API key is required.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      messageKey:
                        type: string
                      message:
                        type: string
                      invalidParams:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            key:
                              type: string
                            message:
                              type: string
                          required:
                            - key
                            - message
                required:
                  - success
                additionalProperties: false
              example:
                success: false
                error:
                  messageKey: unauthorized
                  message: Unauthorized
        '402':
          description: >-
            Payment required. The current billing plan does not allow this
            request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      messageKey:
                        type: string
                      message:
                        type: string
                      invalidParams:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            key:
                              type: string
                            message:
                              type: string
                          required:
                            - key
                            - message
                required:
                  - success
                additionalProperties: false
              example:
                success: false
                error:
                  messageKey: insufficient_billing_plan
                  message: Insufficient billing plan
        '403':
          description: >-
            Forbidden. The API key does not have permission to perform this
            action.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      messageKey:
                        type: string
                      message:
                        type: string
                      invalidParams:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            key:
                              type: string
                            message:
                              type: string
                          required:
                            - key
                            - message
                required:
                  - success
                additionalProperties: false
              example:
                success: false
                error:
                  messageKey: forbidden
                  message: Forbidden
        '404':
          description: Not found. The requested resource does not exist.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      messageKey:
                        type: string
                      message:
                        type: string
                      invalidParams:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            key:
                              type: string
                            message:
                              type: string
                          required:
                            - key
                            - message
                required:
                  - success
                additionalProperties: false
              example:
                success: false
                error:
                  messageKey: contact_not_found
                  message: Contact not found
        '429':
          description: >-
            Too many requests. Retry after the time indicated by the
            X-RateLimit-Reset header.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      messageKey:
                        type: string
                      message:
                        type: string
                      invalidParams:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            key:
                              type: string
                            message:
                              type: string
                          required:
                            - key
                            - message
                required:
                  - success
                additionalProperties: false
              example:
                success: false
                error:
                  messageKey: too_many_requests
                  message: >-
                    Too many requests. Limit is applied per minute per tenant.
                    Please retry after the time indicated by the
                    X-RateLimit-Reset header.
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      messageKey:
                        type: string
                      message:
                        type: string
                      invalidParams:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            key:
                              type: string
                            message:
                              type: string
                          required:
                            - key
                            - message
                required:
                  - success
                additionalProperties: false
              example:
                success: false
                error:
                  messageKey: internal_error
                  message: Oops! Something went wrong
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````