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

# Toggle endpoint

> Enables or disables a webhook endpoint. A disabled webhook won't be notified.



## OpenAPI

````yaml patch /notification-service/api/v1/webhook-endpoints/{id}/enabled/{enabled}
openapi: 3.0.1
info:
  title: Vatis Stream Service
  description: Vatis Stream Service API
  version: '1.0'
servers:
  - url: https://notification-service.vatis.tech
    description: Default server
security: []
paths:
  /notification-service/api/v1/webhook-endpoints/{id}/enabled/{enabled}:
    patch:
      tags:
        - webhook-endpoint-resource-impl
      summary: Toggle endpoint
      description: >-
        Enables or disables a webhook endpoint. A disabled webhook won't be
        notified.
      operationId: toggleWebhookEndpoint
      parameters:
        - name: id
          in: path
          description: Webhook endpoint id
          required: true
          schema:
            type: string
        - name: enabled
          in: path
          required: true
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
      responses:
        '200':
          description: Operation succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookEndpointDto'
        '400':
          description: Webhook endpoints limit reached
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: >-
            The current user is not allowed to perform this action or the
            endpoint does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerToken: []
components:
  schemas:
    WebhookEndpointDto:
      type: object
      properties:
        id:
          type: string
        url:
          type: string
        events:
          type: array
          items:
            type: string
        enabled:
          type: boolean
        description:
          type: string
    ErrorResponse:
      type: object
      properties:
        statusCode:
          type: integer
          format: int32
        title:
          type: string
        message:
          type: string
        internalErrorName:
          type: string
        nestedErrors:
          type: array
          items:
            type: object
  securitySchemes:
    bearerToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````