POST
/
add_webhook
curl --request POST \
  --url https://api.toingg.com/api/v3/add_webhook \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "path": "<string>",
  "method": "GET",
  "description": "<string>",
  "headers": {},
  "params": {},
  "json_data": {}
}'
"<any>"

Overview

The “Add Webhook” endpoint is designed to enable Toingg to perform specific actions by triggering external systems during a call. By sending a POST request to the /add_webhook endpoint, users can configure the webhook to respond to particular events, such as call initiation or completion. This setup allows Toingg to interact with external services in real-time, facilitating actions like data updates, notifications, or other automated processes. Users can specify the webhook’s name, event path, HTTP method, and any necessary headers or JSON data to ensure the webhook functions as intended, providing a seamless integration experience.

Example cURL Request

curl -X POST \
  https://api.toingg.com/api/v3/webhooks/add_webhook \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -d '{
    "name": "YOUR_WEBHOOK_NAME",
    "path": "/your/event/path",
    "method": "POST",
    "description": "Optional description of this webhook",
    "headers": [
      {
        "name": "X-Custom-Header",
        "value": "your_header_value"
      }
    ],
    "params": [
      {
        "name": "api_key",
        "value": "your_api_key"
      }
    ],
    "json_data": {
      "custom_field": "custom_value"
    }
  }'

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json

Response

200
application/json
Successful Response

The response is of type any.