curl --request PATCH \
--url https://api.getoneprofile.ai/outbound-agents/{agent_id}/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"expected_version": 2,
"config": {
"cta_label": "<string>",
"cta_url": "<string>",
"goal": "",
"language": "auto",
"message_prompts": {},
"personality_preset": "direct",
"personality_prompt": "",
"reply_drafting": true,
"reply_prompt": "",
"translate": false
},
"model_key": "<string>",
"research": true
}
'import requests
url = "https://api.getoneprofile.ai/outbound-agents/{agent_id}/"
payload = {
"expected_version": 2,
"config": {
"cta_label": "<string>",
"cta_url": "<string>",
"goal": "",
"language": "auto",
"message_prompts": {},
"personality_preset": "direct",
"personality_prompt": "",
"reply_drafting": True,
"reply_prompt": "",
"translate": False
},
"model_key": "<string>",
"research": True
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
expected_version: 2,
config: {
cta_label: '<string>',
cta_url: '<string>',
goal: '',
language: 'auto',
message_prompts: {},
personality_preset: 'direct',
personality_prompt: '',
reply_drafting: true,
reply_prompt: '',
translate: false
},
model_key: '<string>',
research: true
})
};
fetch('https://api.getoneprofile.ai/outbound-agents/{agent_id}/', 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.getoneprofile.ai/outbound-agents/{agent_id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'expected_version' => 2,
'config' => [
'cta_label' => '<string>',
'cta_url' => '<string>',
'goal' => '',
'language' => 'auto',
'message_prompts' => [
],
'personality_preset' => 'direct',
'personality_prompt' => '',
'reply_drafting' => true,
'reply_prompt' => '',
'translate' => false
],
'model_key' => '<string>',
'research' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.getoneprofile.ai/outbound-agents/{agent_id}/"
payload := strings.NewReader("{\n \"expected_version\": 2,\n \"config\": {\n \"cta_label\": \"<string>\",\n \"cta_url\": \"<string>\",\n \"goal\": \"\",\n \"language\": \"auto\",\n \"message_prompts\": {},\n \"personality_preset\": \"direct\",\n \"personality_prompt\": \"\",\n \"reply_drafting\": true,\n \"reply_prompt\": \"\",\n \"translate\": false\n },\n \"model_key\": \"<string>\",\n \"research\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.patch("https://api.getoneprofile.ai/outbound-agents/{agent_id}/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"expected_version\": 2,\n \"config\": {\n \"cta_label\": \"<string>\",\n \"cta_url\": \"<string>\",\n \"goal\": \"\",\n \"language\": \"auto\",\n \"message_prompts\": {},\n \"personality_preset\": \"direct\",\n \"personality_prompt\": \"\",\n \"reply_drafting\": true,\n \"reply_prompt\": \"\",\n \"translate\": false\n },\n \"model_key\": \"<string>\",\n \"research\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/outbound-agents/{agent_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_version\": 2,\n \"config\": {\n \"cta_label\": \"<string>\",\n \"cta_url\": \"<string>\",\n \"goal\": \"\",\n \"language\": \"auto\",\n \"message_prompts\": {},\n \"personality_preset\": \"direct\",\n \"personality_prompt\": \"\",\n \"reply_drafting\": true,\n \"reply_prompt\": \"\",\n \"translate\": false\n },\n \"model_key\": \"<string>\",\n \"research\": true\n}"
response = http.request(request)
puts response.read_body{
"config": {
"cta_label": "<string>",
"cta_url": "<string>",
"goal": "",
"language": "auto",
"message_prompts": {},
"personality_preset": "direct",
"personality_prompt": "",
"reply_drafting": true,
"reply_prompt": "",
"translate": false
},
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model_key": "<string>",
"name": "<string>",
"research": true,
"updated_at": "2023-11-07T05:31:56Z",
"version": 123
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Change an outbound agent
Write a new version of the agent’s configuration. The whole configuration is sent against the version it was read at; an edit against a stale version is refused so two people editing at once cannot silently overwrite each other.
curl --request PATCH \
--url https://api.getoneprofile.ai/outbound-agents/{agent_id}/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"expected_version": 2,
"config": {
"cta_label": "<string>",
"cta_url": "<string>",
"goal": "",
"language": "auto",
"message_prompts": {},
"personality_preset": "direct",
"personality_prompt": "",
"reply_drafting": true,
"reply_prompt": "",
"translate": false
},
"model_key": "<string>",
"research": true
}
'import requests
url = "https://api.getoneprofile.ai/outbound-agents/{agent_id}/"
payload = {
"expected_version": 2,
"config": {
"cta_label": "<string>",
"cta_url": "<string>",
"goal": "",
"language": "auto",
"message_prompts": {},
"personality_preset": "direct",
"personality_prompt": "",
"reply_drafting": True,
"reply_prompt": "",
"translate": False
},
"model_key": "<string>",
"research": True
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
expected_version: 2,
config: {
cta_label: '<string>',
cta_url: '<string>',
goal: '',
language: 'auto',
message_prompts: {},
personality_preset: 'direct',
personality_prompt: '',
reply_drafting: true,
reply_prompt: '',
translate: false
},
model_key: '<string>',
research: true
})
};
fetch('https://api.getoneprofile.ai/outbound-agents/{agent_id}/', 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.getoneprofile.ai/outbound-agents/{agent_id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'expected_version' => 2,
'config' => [
'cta_label' => '<string>',
'cta_url' => '<string>',
'goal' => '',
'language' => 'auto',
'message_prompts' => [
],
'personality_preset' => 'direct',
'personality_prompt' => '',
'reply_drafting' => true,
'reply_prompt' => '',
'translate' => false
],
'model_key' => '<string>',
'research' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.getoneprofile.ai/outbound-agents/{agent_id}/"
payload := strings.NewReader("{\n \"expected_version\": 2,\n \"config\": {\n \"cta_label\": \"<string>\",\n \"cta_url\": \"<string>\",\n \"goal\": \"\",\n \"language\": \"auto\",\n \"message_prompts\": {},\n \"personality_preset\": \"direct\",\n \"personality_prompt\": \"\",\n \"reply_drafting\": true,\n \"reply_prompt\": \"\",\n \"translate\": false\n },\n \"model_key\": \"<string>\",\n \"research\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.patch("https://api.getoneprofile.ai/outbound-agents/{agent_id}/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"expected_version\": 2,\n \"config\": {\n \"cta_label\": \"<string>\",\n \"cta_url\": \"<string>\",\n \"goal\": \"\",\n \"language\": \"auto\",\n \"message_prompts\": {},\n \"personality_preset\": \"direct\",\n \"personality_prompt\": \"\",\n \"reply_drafting\": true,\n \"reply_prompt\": \"\",\n \"translate\": false\n },\n \"model_key\": \"<string>\",\n \"research\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/outbound-agents/{agent_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_version\": 2,\n \"config\": {\n \"cta_label\": \"<string>\",\n \"cta_url\": \"<string>\",\n \"goal\": \"\",\n \"language\": \"auto\",\n \"message_prompts\": {},\n \"personality_preset\": \"direct\",\n \"personality_prompt\": \"\",\n \"reply_drafting\": true,\n \"reply_prompt\": \"\",\n \"translate\": false\n },\n \"model_key\": \"<string>\",\n \"research\": true\n}"
response = http.request(request)
puts response.read_body{
"config": {
"cta_label": "<string>",
"cta_url": "<string>",
"goal": "",
"language": "auto",
"message_prompts": {},
"personality_preset": "direct",
"personality_prompt": "",
"reply_drafting": true,
"reply_prompt": "",
"translate": false
},
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model_key": "<string>",
"name": "<string>",
"research": true,
"updated_at": "2023-11-07T05:31:56Z",
"version": 123
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
Path Parameters
Body
A change to an agent, sent whole against the version it was read at.
The configuration travels as one object rather than as fifteen optional
fields: the Agent tab reads the agent, edits it and sends it back, and
expected_version makes two people editing at once a 409 rather than a
silent overwrite.
The version the editor was opened at.
x >= 1The whole configuration; omitted leaves it as it is.
Show child attributes
Show child attributes
The model it writes with: swift, core or deep.
Whether the first message may research the person on the web.
Response
Successful Response
One sequence's outbound agent: what it writes with, and how.
The versioned configuration one outbound agent carries, stored as JSON on its row.
Everything a person sets on the Agent tab that is not already a column of
the saved-agent row (model_key and the research switch live there).
message_prompts is keyed by an opaque slot key the caller mints (the
step id); the agent never learns what a slot means.
Show child attributes
Show child attributes
Was this page helpful?