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

# Update a webhook endpoint



## OpenAPI

````yaml /openapi/v2.json patch /webhooks/endpoints/{id}
openapi: 3.1.0
info:
  title: Oktivo API v2
  version: 2.0.0
  description: >-
    Layered, database-agnostic API. Every success response is `{ success: true,
    requestId, timestamp, data, meta? }`; every error is `{ success: false,
    requestId, error: { code, message, details? } }`. Authenticate with an API
    token or a dashboard JWT as a Bearer token (same credentials as
    /api/v1/crm).
servers:
  - url: https://client-backend.oktivo.com/api/v2
security:
  - bearerAuth: []
tags:
  - name: Calls
  - name: Call queue
  - name: Events
  - name: Webhooks
  - name: Agents
  - name: Leads
  - name: Tickets
  - name: Shopify
  - name: Operations
paths:
  /webhooks/endpoints/{id}:
    patch:
      tags:
        - Webhooks
      summary: Update a webhook endpoint
      operationId: updateWebhookEndpoint
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
        - $ref: '#/components/parameters/RequestId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  minLength: 1
                  maxLength: 2048
                eventTypes:
                  type: array
                  items:
                    type: string
                    minLength: 1
                    maxLength: 64
                  minItems: 1
                  maxItems: 100
                isActive:
                  type: boolean
                name:
                  type: string
                  minLength: 1
                  maxLength: 128
                description:
                  type: string
                  maxLength: 1000
                payloadMode:
                  type: string
                  enum:
                    - standard
                    - custom
                deliveryProfile:
                  type: string
                  enum:
                    - standard
                    - panzo
                method:
                  type: string
                  enum:
                    - GET
                    - POST
                    - PUT
                    - PATCH
                    - DELETE
                headers:
                  type: array
                  items:
                    type: object
                    properties:
                      key:
                        type: string
                        minLength: 1
                        maxLength: 128
                      value:
                        type: string
                        maxLength: 1024
                      enabled:
                        type: boolean
                        default: true
                    required:
                      - key
                      - value
                    additionalProperties: false
                  maxItems: 20
                bodyType:
                  type: string
                  enum:
                    - json
                    - form
                    - raw
                    - none
                bodyTemplate:
                  type: string
                auth:
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - none
                        - bearer
                        - api_key
                        - basic
                    token:
                      type: string
                      maxLength: 2048
                    headerName:
                      type: string
                      maxLength: 128
                    sendIn:
                      type: string
                      enum:
                        - header
                        - query
                    username:
                      type: string
                      maxLength: 256
                    password:
                      type: string
                      maxLength: 2048
                  required:
                    - type
                  additionalProperties: false
                conditions:
                  anyOf:
                    - type: array
                      items:
                        type: object
                        properties:
                          field:
                            type: string
                            minLength: 1
                            maxLength: 128
                          operator:
                            type: string
                            enum:
                              - eq
                              - neq
                              - exists
                              - not_exists
                              - contains
                              - gt
                              - lt
                          value:
                            type:
                              - string
                              - number
                              - boolean
                              - 'null'
                        required:
                          - field
                          - operator
                        additionalProperties: false
                      maxItems: 20
                    - type: 'null'
                agentIds:
                  type: array
                  items:
                    type: string
                    minLength: 1
                    maxLength: 128
                  maxItems: 50
                timeoutMs:
                  type: integer
                  minimum: 1000
                  maximum: 30000
                retryOnFailure:
                  type: boolean
                maxRetries:
                  type: integer
                  minimum: 0
                  maximum: 10
              additionalProperties: false
      responses:
        '200':
          description: The updated endpoint
          headers:
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Envelope'
        '401':
          description: Missing or invalid credentials
          headers:
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Authenticated but not allowed (feature not enabled for the account)
          headers:
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Validation failed
          headers:
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded
          headers:
            Retry-After:
              $ref: '#/components/headers/Retry-After'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    RequestId:
      name: X-Request-ID
      in: header
      required: false
      description: >-
        Correlation id (1-128 chars of [A-Za-z0-9_.-]). Echoed in the response;
        generated when absent or unsafe.
      schema:
        type: string
        pattern: ^[\w.-]{1,128}$
  headers:
    RateLimit-Limit:
      description: Requests allowed in the current window
      schema:
        type: integer
    RateLimit-Remaining:
      description: Requests left in the current window
      schema:
        type: integer
    RateLimit-Reset:
      description: Seconds until the window resets
      schema:
        type: integer
    X-Request-ID:
      description: Correlation id of this request
      schema:
        type: string
    Retry-After:
      description: Seconds to wait before retrying
      schema:
        type: integer
  schemas:
    Envelope:
      type: object
      required:
        - success
        - requestId
        - timestamp
        - data
      properties:
        success:
          type: boolean
          const: true
        requestId:
          type: string
        timestamp:
          type: string
          format: date-time
        data: {}
        meta:
          type: object
          additionalProperties: true
          description: 'Pagination: { limit, nextCursor } or { page, limit, total }'
    Error:
      type: object
      required:
        - success
        - requestId
        - error
      properties:
        success:
          type: boolean
          const: false
        requestId:
          type: string
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Stable machine-readable code, e.g. VALIDATION_ERROR
            message:
              type: string
            details: {}
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API token (okt_...) or dashboard JWT

````

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