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

# Update Webhook Endpoint

> Update a webhook's configuration.

The webhook must belong to one of the user's developer apps.
You can update the service_type, url, or secret_token.

**Authentication**: X-API-Key header required



## OpenAPI

````yaml /openapi.json patch /v1/webhooks/{webhook_id}
openapi: 3.1.0
info:
  title: Briq API
  description: Karibu Briq API Documentation
  version: '0.8'
servers:
  - url: https://karibu.briq.tz
    description: Production
  - url: https://pre-release.karibu.briq.tz
    description: Pre-release
  - url: http://karibu.briq.tz
    description: LocalPass
security: []
paths:
  /v1/webhooks/{webhook_id}:
    patch:
      tags:
        - Karibu-Webhooks
      summary: Update Webhook Endpoint
      description: |-
        Update a webhook's configuration.

        The webhook must belong to one of the user's developer apps.
        You can update the service_type, url, or secret_token.

        **Authentication**: X-API-Key header required
      operationId: update_webhook_endpoint_v1_webhooks__webhook_id__patch
      parameters:
        - name: webhook_id
          in: path
          required: true
          schema:
            type: string
            title: Webhook Id
        - name: X-API-Key
          in: header
          required: true
          schema:
            type: string
            title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    WebhookUpdate:
      properties:
        service_type:
          anyOf:
            - type: string
              pattern: ^(sms|voice|otp|whatsapp|email)$
            - type: 'null'
          title: Service Type
          description: Type of service for this webhook
          examples:
            - sms
        url:
          anyOf:
            - type: string
              maxLength: 2083
              minLength: 1
              format: uri
            - type: 'null'
          title: Url
          description: The URL where webhook events will be sent
          examples:
            - https://example.com/webhook/updated
        secret_token:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 16
            - type: 'null'
          title: Secret Token
          description: Secret token for signing outgoing webhook requests
          examples:
            - updated_secret_token
      type: object
      title: WebhookUpdate
      description: Schema for updating an existing webhook.
    WebhookOut:
      properties:
        webhook_id:
          type: string
          title: Webhook Id
          description: Unique identifier for the webhook
        app_id:
          type: string
          title: App Id
          description: The ID of the developer app
        service_type:
          type: string
          title: Service Type
          description: Type of service
        url:
          type: string
          title: Url
          description: The webhook URL
        secret_token:
          anyOf:
            - type: string
            - type: 'null'
          title: Secret Token
          description: Secret token (masked for security)
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the webhook was created
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: When the webhook was last updated
      type: object
      required:
        - webhook_id
        - app_id
        - service_type
        - url
        - created_at
        - updated_at
      title: WebhookOut
      description: Schema for webhook response.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````