Create Agent
curl --request POST \
--url https://app.aisync.link/api/ai/agent/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_name": "<string>",
"general_prompt": "<string>",
"weebhook_endpoint": "<string>",
"weebhook_endpoint_method": "POST"
}
'import requests
url = "https://app.aisync.link/api/ai/agent/create"
payload = {
"agent_name": "<string>",
"general_prompt": "<string>",
"weebhook_endpoint": "<string>",
"weebhook_endpoint_method": "POST"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_name: '<string>',
general_prompt: '<string>',
weebhook_endpoint: '<string>',
weebhook_endpoint_method: 'POST'
})
};
fetch('https://app.aisync.link/api/ai/agent/create', 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/create",
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([
'agent_name' => '<string>',
'general_prompt' => '<string>',
'weebhook_endpoint' => '<string>',
'weebhook_endpoint_method' => 'POST'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://app.aisync.link/api/ai/agent/create"
payload := strings.NewReader("{\n \"agent_name\": \"<string>\",\n \"general_prompt\": \"<string>\",\n \"weebhook_endpoint\": \"<string>\",\n \"weebhook_endpoint_method\": \"POST\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.aisync.link/api/ai/agent/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agent_name\": \"<string>\",\n \"general_prompt\": \"<string>\",\n \"weebhook_endpoint\": \"<string>\",\n \"weebhook_endpoint_method\": \"POST\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aisync.link/api/ai/agent/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_name\": \"<string>\",\n \"general_prompt\": \"<string>\",\n \"weebhook_endpoint\": \"<string>\",\n \"weebhook_endpoint_method\": \"POST\"\n}"
response = http.request(request)
puts response.read_body{
"agent_id": "<string>",
"agent_name": "<string>",
"status": "<string>"
}{
"error": "<string>",
"error_description": "<string>",
"message": "<string>"
}{
"error": "<string>",
"error_description": "<string>",
"message": "<string>"
}AI Agents
Create Agent
Create a new AI agent with custom configuration. Define the agent’s name, general prompt, and optional webhook settings for call completion callbacks.
POST
/
api
/
ai
/
agent
/
create
Create Agent
curl --request POST \
--url https://app.aisync.link/api/ai/agent/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_name": "<string>",
"general_prompt": "<string>",
"weebhook_endpoint": "<string>",
"weebhook_endpoint_method": "POST"
}
'import requests
url = "https://app.aisync.link/api/ai/agent/create"
payload = {
"agent_name": "<string>",
"general_prompt": "<string>",
"weebhook_endpoint": "<string>",
"weebhook_endpoint_method": "POST"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_name: '<string>',
general_prompt: '<string>',
weebhook_endpoint: '<string>',
weebhook_endpoint_method: 'POST'
})
};
fetch('https://app.aisync.link/api/ai/agent/create', 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/create",
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([
'agent_name' => '<string>',
'general_prompt' => '<string>',
'weebhook_endpoint' => '<string>',
'weebhook_endpoint_method' => 'POST'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://app.aisync.link/api/ai/agent/create"
payload := strings.NewReader("{\n \"agent_name\": \"<string>\",\n \"general_prompt\": \"<string>\",\n \"weebhook_endpoint\": \"<string>\",\n \"weebhook_endpoint_method\": \"POST\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.aisync.link/api/ai/agent/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agent_name\": \"<string>\",\n \"general_prompt\": \"<string>\",\n \"weebhook_endpoint\": \"<string>\",\n \"weebhook_endpoint_method\": \"POST\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aisync.link/api/ai/agent/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_name\": \"<string>\",\n \"general_prompt\": \"<string>\",\n \"weebhook_endpoint\": \"<string>\",\n \"weebhook_endpoint_method\": \"POST\"\n}"
response = http.request(request)
puts response.read_body{
"agent_id": "<string>",
"agent_name": "<string>",
"status": "<string>"
}{
"error": "<string>",
"error_description": "<string>",
"message": "<string>"
}{
"error": "<string>",
"error_description": "<string>",
"message": "<string>"
}Create Agent
Create a new AI agent with custom configuration. Define the agent’s name, general prompt, and optional webhook settings for call completion callbacks.string
required
Bearer token in the format:
Bearer {access_token}string
required
Must be set to
application/jsonstring
required
A descriptive name for your AI agent
string
required
The main system prompt that defines the agent’s behavior and purpose. This guides how the agent interacts during calls.
string
Optional callback URL that will be called when the agent completes a call. Leave empty if not needed.
string
HTTP method for the webhook callback. Must be either
GET or POST. Defaults to POST if not specified.curl --location 'https://app.aisync.link/api/ai/agent/create' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{bearer_token}}' \
--data '{
"agent_name": "My Agent 3",
"general_prompt": "Your purpose is simple: book qualified strategist appointments with business owners by running the cleanest, most natural conversations possible.\n\nYou are an AI disguised as a human. You must sound fluid, casual, and confident at all times.",
"weebhook_endpoint": "",
"weebhook_endpoint_method": "POST"
}'
string
Unique identifier for the newly created agent
string
The name of the created agent
string
Status of the agent creation (typically “active” or “pending”)
The general_prompt is crucial for defining your agent’s behavior. Make sure it clearly describes the agent’s purpose, tone, and objectives for best results.
Authorizations
Bearer token authentication. Include the access token in the Authorization header as 'Bearer {access_token}'
Body
application/json
A descriptive name for your AI agent
The main system prompt that defines the agent's behavior and purpose. This guides how the agent interacts during calls.
Optional callback URL that will be called when the agent completes a call. Leave empty if not needed.
HTTP method for the webhook callback. Must be either GET or POST. Defaults to POST if not specified.
Available options:
GET, POST