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

# Update Webhook



## OpenAPI

````yaml PATCH /v1/subscriptions/webhooks/{id}
openapi: 3.1.0
info:
  title: Well Document API
  version: 1.0.0
  description: API for uploading and managing financial documents in the Well platform
servers:
  - url: https://api.wellapp.ai
security: []
paths:
  /v1/subscriptions/webhooks/{id}:
    patch:
      summary: Update webhook subscription
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookSubscription'
      responses:
        '200':
          description: Subscription updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '401':
          description: Unauthorized - invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          $ref: '#/components/responses/WebhookNotFound'
components:
  parameters:
    AuthorizationHeader:
      name: Authorization
      in: header
      required: true
      schema:
        type: string
      description: Bearer token for authentication
  schemas:
    WebhookSubscription:
      type: object
      properties:
        data:
          type: object
          properties:
            type:
              type: string
              const: webhook
            attributes:
              type: object
              properties:
                event:
                  type: string
                  enum:
                    - document.processed
                  description: The event type to subscribe to
                target_url:
                  type: string
                  format: uri
                  description: The URL where webhook events will be sent
                headers:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    type: string
              required:
                - event
                - target_url
              additionalProperties: false
          required:
            - type
            - attributes
          additionalProperties: false
      required:
        - data
      additionalProperties: false
    WebhookResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            type:
              type: string
              const: webhook
            id:
              type: string
              format: uuid
              description: UUID of the webhook subscription
            attributes:
              type: object
              properties:
                event:
                  type: string
                  enum:
                    - document.processed
                  description: The event type subscribed to
                target_url:
                  type: string
                  format: uri
                  description: The URL where webhook events will be sent
                headers:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    type: string
                  description: Headers that will be included with webhook requests
                created_at:
                  type: string
                  format: date-time
                  description: Timestamp when the webhook was created
                active:
                  type: boolean
                  description: Whether the webhook subscription is active
              additionalProperties: false
          additionalProperties: false
      additionalProperties: false
    BadRequestError:
      type: object
      properties:
        code:
          type: string
          example: SCHEMA_VALIDATION_ERROR
          description: Error code identifier
        status:
          type: integer
          example: 400
          description: HTTP status code
        title:
          type: string
          example: Validation Error
          description: Error title
        message:
          type: string
          example: The request is invalid
          description: Detailed error message
        details:
          type: array
          items:
            type: object
            properties:
              instancePath:
                type: string
                description: Path to the invalid field in the request
              schemaPath:
                type: string
                description: Path to the validation rule in the schema
              keyword:
                type: string
                description: Validation keyword that failed
              params:
                type: object
                description: Parameters related to the validation failure
              message:
                type: string
                description: Human-readable validation error message
          description: Array of detailed validation errors
        meta:
          type: object
          properties:
            log_id:
              type: string
              format: uuid
              example: 65c669d4-679c-4a8b-b8c0-fbe37699bb5b
              description: Unique identifier for tracking this error in logs
          required:
            - log_id
      required:
        - code
        - status
        - title
        - message
        - meta
    UnauthorizedError:
      type: object
      properties:
        code:
          type: string
          example: UNAUTHORIZED
          description: Error code identifier
        status:
          type: integer
          example: 401
          description: HTTP status code
        title:
          type: string
          example: Unauthorized
          description: Error title
        message:
          type: string
          example: You are not authorized to access this resource
          description: Detailed error message
        meta:
          type: object
          properties:
            log_id:
              type: string
              format: uuid
              example: 65c669d4-679c-4a8b-b8c0-fbe37699bb5b
              description: Unique identifier for tracking this error in logs
          required:
            - log_id
      required:
        - code
        - status
        - title
        - message
        - meta
  responses:
    WebhookNotFound:
      description: Webhook subscription not found
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: WEBHOOK_NOT_FOUND
                description: Error code identifier
              status:
                type: integer
                example: 404
                description: HTTP status code
              title:
                type: string
                example: Webhook Subscription Not Found
                description: Error title
              message:
                type: string
                example: The requested webhook subscription could not be found
                description: Detailed error message
              meta:
                type: object
                properties:
                  log_id:
                    type: string
                    format: uuid
                    example: 65c669d4-679c-4a8b-b8c0-fbe37699bb5b
                    description: Unique identifier for tracking this error in logs
                required:
                  - log_id
            required:
              - code
              - status
              - title
              - message
              - meta

````