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

# Actualizar encabezados/URL

> Actualiza la URL y/o los encabezados personalizados del webhook. Envíe `headers: {}` para eliminarlos todos.



## OpenAPI

````yaml /es/guides/webhooks/api-reference/openapi-webhooks.json patch /v1/webhooks/{id}
openapi: 3.0.3
info:
  title: Notifique API. Webhooks
  description: >-
    Cadastre URLs HTTPS para receber eventos da Notifique em tempo real.
    Autentique com `Authorization: Bearer sk_live_...` ou `x-api-key`. Escopos:
    `webhooks:read`, `webhooks:manage`.
  version: 1.0.0
servers:
  - url: https://api.notifique.dev
    description: Produção
security:
  - ntfWhBearerAuth: []
  - ntfWhApiKeyHeader: []
tags:
  - name: Webhooks
    description: CRUD de endpoints de webhook do workspace.
  - name: Entregas
    description: Histórico e reenvio de tentativas de entrega de webhook.
paths:
  /v1/webhooks/{id}:
    patch:
      tags:
        - Webhooks
      summary: Actualizar encabezados/URL
      description: >-
        Actualiza la URL y/o los encabezados personalizados del webhook. Envíe
        `headers: {}` para eliminarlos todos.
      operationId: ntfWh_patchWebhook
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  format: uri
                  maxLength: 2048
                headers: e258686a-0d2f-4260-a8a0-53ada3fdad8d
            example:
              headers:
                Authorization: Bearer teste
      responses:
        '200':
          description: Webhook actualizado.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ntfWh_GetWebhookResponse'
        '400':
          $ref: '#/components/responses/Ntf_BadRequest'
        '401':
          $ref: '#/components/responses/Ntf_Unauthorized'
        '403':
          $ref: '#/components/responses/Ntf_Forbidden'
        '404':
          $ref: '#/components/responses/Ntf_NotFound'
components:
  schemas:
    ntfWh_GetWebhookResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
            url:
              type: string
            events:
              type: array
              items:
                type: string
            instanceIds:
              type: array
              items:
                type: object
            enabled:
              type: boolean
            headers:
              $ref: '#/components/schemas/ntfWh_WebhookHeaders'
      example:
        success: true
        data:
          id: clxx...
          name: Exemplo
          url: https://example.com/resource
          events:
            - string
          instanceIds:
            - {}
          enabled: true
    ntfWh_WebhookHeaders:
      type: object
      description: >-
        Hasta 10 encabezados personalizados; los valores se cifran y se
        enmascaran en las respuestas GET.
      additionalProperties:
        type: string
      example:
        Authorization: Bearer ********
    Ntf_Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
        message:
          type: string
        code:
          type: string
      example:
        success: false
        error: string
        message: string
        code: string
  responses:
    Ntf_BadRequest:
      description: Body inválido ou campo inesperado.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Ntf_Error'
          examples:
            validation:
              value:
                success: false
                error: Bad Request
                message: url must be HTTPS
                code: VALIDATION_ERROR
            unexpected_fields:
              value:
                success: false
                code: UNEXPECTED_FIELDS
    Ntf_Unauthorized:
      description: Chave ausente, inválida ou revogada.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Ntf_Error'
          example:
            success: false
            error: Unauthorized
            message: Invalid API key
            code: UNAUTHORIZED
    Ntf_Forbidden:
      description: Escopo ausente ou recurso fora da permissão da chave.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Ntf_Error'
          example:
            success: false
            error: Forbidden
            message: Missing scope webhooks:manage
            code: FORBIDDEN
    Ntf_NotFound:
      description: Recurso não encontrado no workspace.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Ntf_Error'
          example:
            success: false
            error: Not Found
            message: Webhook not found
            code: NOT_FOUND
  securitySchemes:
    ntfWhBearerAuth:
      type: http
      scheme: bearer
      description: API key `sk_live_...` ou `sk_test_...`.
    ntfWhApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: Alternativa ao Bearer.

````

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