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

# Atualizar webhook

> Atualize um webhook específico, passando o webhook_id.



## OpenAPI

````yaml put /webhooks/{id}
openapi: 3.1.0
info:
  version: 1.0.0
  title: API Kiwify
  description: ''
servers:
  - url: https://public-api.kiwify.com/v1/
    description: base
security: []
tags:
  - name: Autenticação
  - name: Conta
  - name: Produtos
  - name: Vendas
  - name: Financeiro
  - name: Affiliados
  - name: Webhooks
  - name: Eventos
paths:
  /webhooks/{id}:
    put:
      tags:
        - Webhooks
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookRequest'
      responses:
        '200':
          description: Webhook data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
              examples:
                Webhook:
                  summary: Webhook example
                  value:
                    id: c2be7f8e-b373-4eb7-b623-16ce98d5ed44
                    name: meu webhook
                    url: https://webhook.site/73d28a2b-6c48-41e0-a8ad-0d5ef748ce41
                    products: ba22c4a0-5c94-11ee-9c2d-8d32d7a17894
                    triggers:
                      - boleto_gerado
                      - pix_gerado
                      - carrinho_abandonado
                      - compra_recusada
                      - compra_aprovada
                      - compra_reembolsada
                      - chargeback
                      - subscription_canceled
                      - subscription_late
                      - subscription_renewed
                    token: rxue90njjv1
                    created_at: '2023-11-24T10:06:47.540Z'
                    updated_at: '2023-11-24T10:06:47.540Z'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthErrorResponse'
              examples:
                InvalidClient:
                  value:
                    error: auth_error
                    message: 'Invalid token: access token is invalid'
          description: Solicitação Inválida
      security:
        - AccountIdHeader: []
          OAuth2:
            - webhooks
components:
  schemas:
    WebhookRequest:
      type: object
      properties:
        name:
          type: string
          example: meu webhook
        url:
          type: string
          example: https://webhook.site/73d28a2b-6c48-41e0-a8ad-0d5ef748ce41
        products:
          type: string
          example: all
        triggers:
          type: array
          example:
            - boleto_gerado
            - pix_gerado
            - carrinho_abandonado
            - compra_recusada
            - compra_aprovada
            - compra_reembolsada
            - chargeback
            - subscription_canceled
            - subscription_late
            - subscription_renewed
          items:
            type: string
            enum:
              - boleto_gerado
              - pix_gerado
              - carrinho_abandonado
              - compra_recusada
              - compra_aprovada
              - compra_reembolsada
              - chargeback
              - subscription_canceled
              - subscription_late
              - subscription_renewed
        token:
          type: string
          example: w9i3pvutvxe
    Webhook:
      type: object
      properties:
        id:
          type: string
          example: 3d379edc-9e21-47ee-8974-ca80a4c7839d
        name:
          type: string
          example: Meu Webhook
        url:
          type: string
          example: https://webhook.site/73d28a2b-6c48-41e0-a8ad-0d5ef748ce41
        products:
          type: string
          example: all
        triggers:
          type: array
          example:
            - boleto_gerado
            - pix_gerado
            - carrinho_abandonado
            - compra_recusada
            - compra_aprovada
            - compra_reembolsada
            - chargeback
            - subscription_canceled
            - subscription_late
            - subscription_renewed
          items:
            type: string
            enum:
              - boleto_gerado
              - pix_gerado
              - carrinho_abandonado
              - compra_recusada
              - compra_aprovada
              - compra_reembolsada
              - chargeback
              - subscription_canceled
              - subscription_late
              - subscription_renewed
        token:
          type: string
          example: rxue90njjv1
        created_at:
          type: string
          example: '2023-11-24T10:06:47.540Z'
        updated_at:
          type: string
          example: '2023-11-24T10:06:47.540Z'
    OAuthErrorResponse:
      type: object
      properties:
        error:
          type: string
          example: auth_error
        message:
          type: string
          example: 'Invalid client: client is invalid'
  securitySchemes:
    AccountIdHeader:
      type: apiKey
      in: header
      name: x-kiwify-account-id
    OAuth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: /oauth/token
          scopes:
            stats: stats
            products: products
            events: events
            sales: sales
            sales_refund: sales_refund
            financial: financial
            affiliates: affiliates
            webhooks: webhooks

````