curl --request POST \
--url https://api.d-api.cloud/api/v1/hooks/va/{token} \
--header 'Content-Type: application/json' \
--data '
{
"phone": "5511999990000",
"sessionId": "<string>",
"variables": {}
}
'import requests
url = "https://api.d-api.cloud/api/v1/hooks/va/{token}"
payload = {
"phone": "5511999990000",
"sessionId": "<string>",
"variables": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({phone: '5511999990000', sessionId: '<string>', variables: {}})
};
fetch('https://api.d-api.cloud/api/v1/hooks/va/{token}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.d-api.cloud/api/v1/hooks/va/{token}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'phone' => '5511999990000',
'sessionId' => '<string>',
'variables' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.d-api.cloud/api/v1/hooks/va/{token}"
payload := strings.NewReader("{\n \"phone\": \"5511999990000\",\n \"sessionId\": \"<string>\",\n \"variables\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.d-api.cloud/api/v1/hooks/va/{token}")
.header("Content-Type", "application/json")
.body("{\n \"phone\": \"5511999990000\",\n \"sessionId\": \"<string>\",\n \"variables\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.d-api.cloud/api/v1/hooks/va/{token}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"phone\": \"5511999990000\",\n \"sessionId\": \"<string>\",\n \"variables\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"callId": "<string>",
"status": "queued",
"queuePosition": 123
}{
"success": true,
"code": "<string>",
"message": "<string>"
}{
"success": true,
"code": "<string>",
"message": "<string>"
}{
"success": true,
"code": "<string>",
"message": "<string>"
}{
"success": true,
"code": "<string>",
"message": "<string>"
}{
"success": true,
"code": "<string>",
"message": "<string>"
}{
"success": true,
"code": "<string>",
"message": "<string>"
}{
"success": true,
"code": "<string>",
"message": "<string>"
}{
"success": true,
"code": "<string>",
"message": "<string>"
}{
"success": true,
"code": "<string>",
"message": "<string>"
}Trigger an agent call (public trigger URL)
Public by design: the token in the URL is the credential (no API key). Create the trigger in the dashboard.
JSON body (up to 16 KB): phone (with country code; a BR number without country code gets 55), optional sessionId (trigger default), optional variables (only variables declared on the agent; up to 30, values up to 500 characters). Flat top-level keys "variables.<name>": value are also accepted (the variables object wins on conflict).
Signature (when the trigger requires it): X-DAPI-Signature: t=<unix>,v1=<hex HMAC-SHA256(secret, t + "." + body)>, 300 s tolerance.
Idempotency-Key (up to 128): repeats within 24 h get the same response. Without it, the same phone + variables within 60 s also do.
Outside the trigger’s time window the call is scheduled for the next opening (status: "scheduled").
Errors: 404 not_found, 423 trigger_paused, 401 invalid_signature, 400 invalid_input/missing_variables, 403 session_not_allowed/country_not_allowed, 409 agent_not_published/request_in_progress, 402 insufficient_balance/daily_cap_reached, 413 payload_too_large, 429 rate_limited (with retryAfterSec and Retry-After)/queue_full.
curl --request POST \
--url https://api.d-api.cloud/api/v1/hooks/va/{token} \
--header 'Content-Type: application/json' \
--data '
{
"phone": "5511999990000",
"sessionId": "<string>",
"variables": {}
}
'import requests
url = "https://api.d-api.cloud/api/v1/hooks/va/{token}"
payload = {
"phone": "5511999990000",
"sessionId": "<string>",
"variables": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({phone: '5511999990000', sessionId: '<string>', variables: {}})
};
fetch('https://api.d-api.cloud/api/v1/hooks/va/{token}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.d-api.cloud/api/v1/hooks/va/{token}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'phone' => '5511999990000',
'sessionId' => '<string>',
'variables' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.d-api.cloud/api/v1/hooks/va/{token}"
payload := strings.NewReader("{\n \"phone\": \"5511999990000\",\n \"sessionId\": \"<string>\",\n \"variables\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.d-api.cloud/api/v1/hooks/va/{token}")
.header("Content-Type", "application/json")
.body("{\n \"phone\": \"5511999990000\",\n \"sessionId\": \"<string>\",\n \"variables\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.d-api.cloud/api/v1/hooks/va/{token}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"phone\": \"5511999990000\",\n \"sessionId\": \"<string>\",\n \"variables\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"callId": "<string>",
"status": "queued",
"queuePosition": 123
}{
"success": true,
"code": "<string>",
"message": "<string>"
}{
"success": true,
"code": "<string>",
"message": "<string>"
}{
"success": true,
"code": "<string>",
"message": "<string>"
}{
"success": true,
"code": "<string>",
"message": "<string>"
}{
"success": true,
"code": "<string>",
"message": "<string>"
}{
"success": true,
"code": "<string>",
"message": "<string>"
}{
"success": true,
"code": "<string>",
"message": "<string>"
}{
"success": true,
"code": "<string>",
"message": "<string>"
}{
"success": true,
"code": "<string>",
"message": "<string>"
}