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

# Callback Example

> This endpoint demonstrates the structure of a callback triggered when a specified traffic threshold is reached.  
The callback URL should be provided during webhook setup, and this request will be made when the traffic trigger value is reached.




## OpenAPI

````yaml post /example/callback
openapi: 3.0.0
info:
  title: EDIS Global Management API
  description: >
    Use the API to access and manage your VPS services, including power control,
    rDNS, and VNC management.  

    **Authentication:** Enable API access on any KVM VPS you own. Then use the
    provided credentials to authenticate your requests.
  version: 1.0.0
servers:
  - url: https://{api_host}
    description: Dynamic API host returned from the AUTH session endpoint.
    variables:
      api_host:
        default: api_host.edisglobal.com
        description: >-
          Enter the full API host exactly as returned by /kvm/v2/get/auth (for
          example: 12345.edisglobal.com)
security: []
tags:
  - name: Authentication
    description: Create an AUTH Session
  - name: Power Management
    description: KVM Power Management
  - name: Installation
    description: ISO, Turnkey, Reinstall
  - name: Settings
    description: KVM System Settings
  - name: Collect Information
    description: KVM VPS Details.
  - name: VNC Management
    description: KVM VNC Access
  - name: PTR
    description: KVM Reverse DNS
  - name: Traffic Pool
    description: Traffic Pool Management
  - name: Hooks
    description: KVM Webhook Management
paths:
  /example/callback:
    post:
      tags:
        - Hooks
      summary: Example Callback Triggered
      description: >
        This endpoint demonstrates the structure of a callback triggered when a
        specified traffic threshold is reached.  

        The callback URL should be provided during webhook setup, and this
        request will be made when the traffic trigger value is reached.
      operationId: trafficHookCallbackExample
      requestBody:
        description: Parameters sent to the callback URL when the webhook is triggered.
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/example_callback_body'
        required: true
      responses:
        '200':
          description: Callback received and processed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_200_27'
        '400':
          description: Bad Request - Missing or invalid parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_400_22'
        '500':
          description: Internal Server Error - An unexpected error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_500_19'
      servers:
        - url: https://{callback_url}
          description: >
            Callback Server - The `callback_url` parameter should be provided
            when setting up the webhook.
          variables:
            callback_url:
              description: >-
                The user-defined callback URL where webhook notifications are
                sent.
              default: your-callback-url.com
components:
  schemas:
    example_callback_body:
      type: object
      properties:
        kvm:
          type: string
          description: The unique identifier of the KVM VPS.
          example: kvm_123456_789012
        details:
          type: string
          description: Details about the traffic threshold reached.
          example: Traffic usage reached 80%
        trigger_value:
          type: integer
          description: The current traffic value when the callback is triggered.
          example: 80
    inline_response_200_27:
      type: object
      properties:
        status:
          type: string
          description: Status of the callback handling.
          example: success
        message:
          type: string
          description: Confirmation message indicating successful processing.
          example: Callback received successfully.
    inline_response_400_22:
      type: object
      properties:
        status:
          type: string
          example: error
        message:
          type: string
          example: Invalid request parameters provided.
    inline_response_500_19:
      type: object
      properties:
        status:
          type: string
          example: error
        message:
          type: string
          example: Internal server error occurred while processing the callback.

````