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

# Update webhook subscription

> Partially updates a webhook subscription. Only the fields present in the body are changed; `headers` and `events` replace the stored value entirely rather than merging.



## OpenAPI

````yaml PATCH /webhook/{webhookId}
openapi: 3.0.1
info:
  title: Tela API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.tela.com
security: []
paths:
  /webhook/{webhookId}:
    patch:
      tags:
        - Webhook
      summary: Update webhook subscription
      description: >
        Partially updates a webhook subscription. Only the fields present in the
        body are changed; `headers`

        and `events` replace the stored value entirely rather than merging. Use
        `isActive: false` to pause

        deliveries without deleting the subscription.
      operationId: updateWebhook
      parameters:
        - $ref: '#/components/parameters/WebhookIdPath'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookUpdateRequest'
      responses:
        '200':
          description: Updated webhook subscription
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '400':
          $ref: '#/components/responses/WebhookBadRequest'
        '401':
          $ref: '#/components/responses/WebhookUnauthorized'
        '403':
          $ref: '#/components/responses/WebhookForbidden'
        '404':
          $ref: '#/components/responses/WebhookNotFound'
        '422':
          $ref: '#/components/responses/WebhookValidationError'
        '500':
          description: >-
            The new URL was rejected (private network, non-HTTPS in production,
            or malformed). Currently surfaced as a server error rather than
            `400`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  parameters:
    WebhookIdPath:
      name: webhookId
      in: path
      required: true
      description: Webhook subscription ID
      schema:
        type: string
        format: uuid
  schemas:
    WebhookUpdateRequest:
      type: object
      description: All fields optional; only provided fields are changed.
      properties:
        name:
          type: string
          maxLength: 256
        url:
          type: string
          maxLength: 2048
          description: Same restrictions as on creation.
        events:
          type: array
          items:
            $ref: '#/components/schemas/WebhookEventType'
          description: Replaces the subscribed events.
        headers:
          type: object
          nullable: true
          additionalProperties:
            type: string
          description: Replaces the configured headers.
        sensitiveHeaders:
          type: array
          items:
            type: string
        method:
          type: string
          nullable: true
          maxLength: 10
        isActive:
          type: boolean
        promptApplicationId:
          type: string
          format: uuid
          nullable: true
          description: Moves the webhook to another application.
      example:
        events:
          - task.completed
          - task.approved
          - task.failed
        isActive: false
    Webhook:
      type: object
      description: A webhook subscription of a Workstation application.
      properties:
        id:
          type: string
          format: uuid
        promptApplicationId:
          type: string
          format: uuid
          nullable: true
          description: Application the webhook belongs to.
        name:
          type: string
          maxLength: 256
        url:
          type: string
          maxLength: 2048
          description: Endpoint that receives the events.
        events:
          type: array
          items:
            $ref: '#/components/schemas/WebhookEventType'
        headers:
          type: object
          nullable: true
          additionalProperties:
            type: string
          description: >-
            Headers sent verbatim with every delivery. Use them for
            authentication (for example `authorization` or `x-api-key`).
        sensitiveHeaders:
          type: array
          items:
            type: string
          description: >-
            Names of headers considered sensitive. Stored as provided; the API
            does not currently mask them in responses.
        method:
          type: string
          nullable: true
          maxLength: 10
          description: HTTP method used for deliveries. Defaults to `POST`.
        isActive:
          type: boolean
          description: Inactive webhooks receive no deliveries.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
      required:
        - id
        - promptApplicationId
        - name
        - url
        - events
        - headers
        - sensitiveHeaders
        - method
        - isActive
        - createdAt
        - updatedAt
        - deletedAt
      example:
        id: 7d8e9f0a-1b2c-4d3e-8f4a-5b6c7d8e9f0a
        promptApplicationId: c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f
        name: ERP sync
        url: https://erp.example.com/hooks/tela
        events:
          - task.completed
          - task.approved
        headers:
          authorization: Bearer erp-webhook-token
          x-source: tela
        sensitiveHeaders:
          - authorization
        method: POST
        isActive: true
        createdAt: '2025-06-10T08:00:00.000Z'
        updatedAt: '2025-06-10T08:00:00.000Z'
        deletedAt: null
    Error: {}
    WebhookEventType:
      type: string
      enum:
        - task.completed
        - task.approved
        - task.approval-revoke
        - task.failed
      description: >
        Events a webhook can subscribe to:

        - `task.completed` — a task run finished successfully and is ready for
        review.

        - `task.approved` — a task was reviewed and approved.

        - `task.approval-revoke` — an approved task was sent back to
        `validating`.

        - `task.failed` — a task run ended with a failure (`errorMessage` is set
        in the payload).
  responses:
    WebhookBadRequest:
      description: Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    WebhookUnauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    WebhookForbidden:
      description: The key does not have the required role
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    WebhookNotFound:
      description: Webhook not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    WebhookValidationError:
      description: Request body or query failed schema validation (`code` is `VALIDATION`)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT or UUID

````

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