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

# Update a webhook endpoint

> Setting `is_enabled` to true re-enables an endpoint disabled after repeated failures.



## OpenAPI

````yaml /api-reference/v2.0/openapi.json put /webhooks/{id}
openapi: 3.1.0
info:
  title: Shortext API
  description: >-
    **Versioning**: every version is a frozen contract. A released version only
    receives additive changes

    (new endpoints, new optional fields, new response fields); anything breaking
    ships in a new version.

    Responses carry `X-Shortext-Api-Version`. When a version is scheduled for
    removal, responses also carry

    `Deprecation` and `Sunset` headers; after the sunset date the version
    answers HTTP 410.

    The list of versions and their status is available at `GET /api/versions`.


    **Responses**: always HTTP 200. Check `success` and `code` (`1000` =
    success), see `ApiEnvelope`.

    On failure, `trace_id` identifies the request for support.
  version: '2.0'
servers:
  - url: https://shortext.ny-corp.io/api/v2.0
security: []
tags:
  - name: Agents
    description: Agents
  - name: Channels
    description: Channels
  - name: Conversations
    description: Conversations
  - name: Account
    description: Account
  - name: Templates
    description: Templates
  - name: Hosted sessions
    description: Hosted sessions
  - name: Webhooks
    description: Webhooks
paths:
  /webhooks/{id}:
    put:
      tags:
        - Webhooks
      summary: Update a webhook endpoint
      description: >-
        Setting `is_enabled` to true re-enables an endpoint disabled after
        repeated failures.
      operationId: updateWebhook
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEndpointInput'
      responses:
        '200':
          description: >-
            Always HTTP 200: the outcome is in `success` and `code` (absolute
            value of the response code).
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiEnvelope'
                  - properties:
                      body:
                        $ref: '#/components/schemas/WebhookEndpoint'
                    type: object
      security:
        - bearerAuth: []
components:
  schemas:
    WebhookEndpointInput:
      properties:
        url:
          description: Public HTTPS URL
          type: string
          format: uri
          example: https://example.com/webhooks/shortext
        events:
          type: array
          items:
            type: string
          example:
            - message.*
            - conversation.handover
        filters:
          description: Only receive events whose context matches, e.g. one agent
          type:
            - object
            - 'null'
          example:
            app: AGI-XXXXX
        description:
          type:
            - string
            - 'null'
        is_enabled:
          type: boolean
      type: object
    ApiEnvelope:
      properties:
        success:
          type: boolean
          example: true
        code:
          type: integer
          example: 1000
        message:
          type: string
          example: Request success.
        body:
          description: Endpoint payload, null when there is none
        token:
          description: Present only on authentication routes
          type:
            - string
            - 'null'
        trace_id:
          description: Present only when success is false
          type:
            - string
            - 'null'
      type: object
    WebhookEndpoint:
      properties:
        id:
          type: string
          format: uuid
        url:
          type: string
          format: uri
        events:
          type: array
          items:
            type: string
        filters:
          type:
            - object
            - 'null'
        api_version:
          description: Version of the payloads sent to this endpoint
          type:
            - string
            - 'null'
          example: v2.0
        description:
          type:
            - string
            - 'null'
        is_enabled:
          type: boolean
        disabled_reason:
          description: Set when disabled after failing for 3 days
          type:
            - string
            - 'null'
        failing_since:
          type:
            - string
            - 'null'
          format: date-time
        last_success_at:
          type:
            - string
            - 'null'
          format: date-time
        last_failure_at:
          type:
            - string
            - 'null'
          format: date-time
        last_error:
          type:
            - string
            - 'null'
        created_at:
          type: string
          format: date-time
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      description: >-
        Company API key, sent as `Authorization: Bearer <key>`. Create it in the
        dashboard (Developer > API Keys) with the permissions the integration
        needs.
      scheme: bearer

````

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