AI Call Endpoint
curl --request GET \
--url https://app.aisync.link/api/ai/agent/call-endpoint \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.aisync.link/api/ai/agent/call-endpoint"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.aisync.link/api/ai/agent/call-endpoint', 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://app.aisync.link/api/ai/agent/call-endpoint",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.aisync.link/api/ai/agent/call-endpoint"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.aisync.link/api/ai/agent/call-endpoint")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aisync.link/api/ai/agent/call-endpoint")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"endpoint": "",
"Method": "POST",
"form_data": [
"phone_number",
"email",
"first_name",
"last_name",
"ghl_contact_id",
"override_agent_id",
"local_presence_number=No (Yes/No)<br> [If Yes, then the call will be made from AI local presence number]"
]
}
}{
"error": "<string>",
"error_description": "<string>",
"message": "<string>"
}{
"error": "<string>",
"error_description": "<string>",
"message": "<string>"
}{
"error": "<string>",
"error_description": "<string>",
"message": "<string>"
}AI Agents
AI Call Endpoint
Retrieve the call endpoint URL for a specific AI agent. This endpoint provides the unique URL that can be used to initiate calls with the specified agent.
GET
/
api
/
ai
/
agent
/
call-endpoint
AI Call Endpoint
curl --request GET \
--url https://app.aisync.link/api/ai/agent/call-endpoint \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.aisync.link/api/ai/agent/call-endpoint"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.aisync.link/api/ai/agent/call-endpoint', 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://app.aisync.link/api/ai/agent/call-endpoint",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.aisync.link/api/ai/agent/call-endpoint"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.aisync.link/api/ai/agent/call-endpoint")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aisync.link/api/ai/agent/call-endpoint")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"endpoint": "",
"Method": "POST",
"form_data": [
"phone_number",
"email",
"first_name",
"last_name",
"ghl_contact_id",
"override_agent_id",
"local_presence_number=No (Yes/No)<br> [If Yes, then the call will be made from AI local presence number]"
]
}
}{
"error": "<string>",
"error_description": "<string>",
"message": "<string>"
}{
"error": "<string>",
"error_description": "<string>",
"message": "<string>"
}{
"error": "<string>",
"error_description": "<string>",
"message": "<string>"
}AI Call Endpoint
Retrieve the call endpoint URL for a specific AI agent. This endpoint provides the unique URL that can be used to initiate calls with the specified agent.curl --location 'https://app.aisync.link/api/ai/agent/call-endpoint?agent_id=agent_07a9005357b35d0943f7359ad9' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{bearer_token}}'
Array of form field names that must be included when making a POST request to the endpoint:
phone_number: The phone number to callemail: Contact email addressfirst_name: Contact’s first namelast_name: Contact’s last nameghl_contact_id: GoHighLevel contact IDoverride_agent_id: Agent ID override (optional)local_presence_number: Set to “Yes” to make the call from AI local presence number, or “No” otherwise
Use the returned endpoint URL with POST method and include the required form_data fields to initiate conversations with your AI agent. The endpoint is unique to each agent. When
local_presence_number is set to “Yes”, the call will be made from the AI local presence number.