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

# Update a endpoint



## OpenAPI

````yaml https://raw.githubusercontent.com/webhookx-io/webhookx/refs/heads/main/openapi.yml put /workspaces/{ws_id}/endpoints/{id}
openapi: 3.0.3
info:
  title: WebhookX Admin API
  contact:
    name: WebhookX
    url: https://github.com/webhookx-io/webhookx
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.1
servers:
  - url: http://localhost:9601
security: []
paths:
  /workspaces/{ws_id}/endpoints/{id}:
    parameters:
      - $ref: '#/components/parameters/workspace_id'
    put:
      tags:
        - Endpoint
      summary: Update a endpoint
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Endpoint'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Endpoint'
components:
  parameters:
    workspace_id:
      in: path
      name: ws_id
      required: true
      schema:
        type: string
        example: default
      description: The workspace id
  schemas:
    Endpoint:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        enabled:
          type: boolean
          default: true
        request:
          type: object
          default:
            method: POST
            headers: null
            timeout: 10000
          properties:
            url:
              type: string
              minLength: 1
              example: https://example.com
            method:
              type: string
              enum:
                - GET
                - POST
                - PUT
                - DELETE
                - PATCH
              default: POST
            headers:
              type: object
              nullable: true
              additionalProperties:
                type: string
              default: null
            timeout:
              type: integer
              minimum: 0
              maximum: 60000
              default: 10000
          required:
            - url
        retry:
          type: object
          default:
            strategy: fixed
            config:
              attempts:
                - 0
                - 60
                - 3600
          properties:
            strategy:
              type: string
              enum:
                - fixed
              default: fixed
            config:
              type: object
              default:
                attempts:
                  - 0
                  - 60
                  - 3600
              properties:
                attempts:
                  type: array
                  minItems: 1
                  items:
                    type: integer
                    minimum: 0
                  default:
                    - 0
                    - 60
                    - 3600
        events:
          type: array
          items:
            type: string
            example: foo.bar
          default: []
        metadata:
          $ref: '#/components/schemas/Metadata'
        rate_limit:
          $ref: '#/components/schemas/RateLimit'
        created_at:
          type: integer
          readOnly: true
        updated_at:
          type: integer
          readOnly: true
    Metadata:
      type: object
      additionalProperties:
        type: string
      default: {}
    RateLimit:
      type: object
      nullable: true
      description: >-
        The rate limit that uses GCRA algorithm (a variant of the leaky bucket
        algorithm that supports bursts).
      properties:
        quota:
          type: integer
          minimum: 0
          description: Rate limiting quota that allowed in every period.
        period:
          type: integer
          minimum: 1
          description: Rate limiting period in seconds.
      required:
        - quota
        - period

````