Update GHL agent prompt
curl --request PATCH \
--url https://ai.wisepilot.app/api/v1/ghl/agents/{id}/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"personality": "<string>",
"instructions": "<string>",
"goal": "<string>"
}
'import requests
url = "https://ai.wisepilot.app/api/v1/ghl/agents/{id}/update"
payload = {
"personality": "<string>",
"instructions": "<string>",
"goal": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({personality: '<string>', instructions: '<string>', goal: '<string>'})
};
fetch('https://ai.wisepilot.app/api/v1/ghl/agents/{id}/update', 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://ai.wisepilot.app/api/v1/ghl/agents/{id}/update",
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([
'personality' => '<string>',
'instructions' => '<string>',
'goal' => '<string>'
]),
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://ai.wisepilot.app/api/v1/ghl/agents/{id}/update"
payload := strings.NewReader("{\n \"personality\": \"<string>\",\n \"instructions\": \"<string>\",\n \"goal\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://ai.wisepilot.app/api/v1/ghl/agents/{id}/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"personality\": \"<string>\",\n \"instructions\": \"<string>\",\n \"goal\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ai.wisepilot.app/api/v1/ghl/agents/{id}/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"personality\": \"<string>\",\n \"instructions\": \"<string>\",\n \"goal\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "<string>",
"ghlAgentId": "<string>",
"name": "<string>",
"status": "<string>",
"activePromptVersion": {
"versionNumber": 123,
"promptText": "<string>",
"isActive": true
},
"createdAt": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": "Invalid API key",
"code": "INVALID_API_KEY"
}{
"success": false,
"error": "Not found"
}GHL
Update GHL agent prompt
Update the agent’s personality, instructions, and goal. Uses PUT to GHL API (PATCH returns 404). minRole: editor
PATCH
/
ghl
/
agents
/
{id}
/
update
Update GHL agent prompt
curl --request PATCH \
--url https://ai.wisepilot.app/api/v1/ghl/agents/{id}/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"personality": "<string>",
"instructions": "<string>",
"goal": "<string>"
}
'import requests
url = "https://ai.wisepilot.app/api/v1/ghl/agents/{id}/update"
payload = {
"personality": "<string>",
"instructions": "<string>",
"goal": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({personality: '<string>', instructions: '<string>', goal: '<string>'})
};
fetch('https://ai.wisepilot.app/api/v1/ghl/agents/{id}/update', 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://ai.wisepilot.app/api/v1/ghl/agents/{id}/update",
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([
'personality' => '<string>',
'instructions' => '<string>',
'goal' => '<string>'
]),
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://ai.wisepilot.app/api/v1/ghl/agents/{id}/update"
payload := strings.NewReader("{\n \"personality\": \"<string>\",\n \"instructions\": \"<string>\",\n \"goal\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://ai.wisepilot.app/api/v1/ghl/agents/{id}/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"personality\": \"<string>\",\n \"instructions\": \"<string>\",\n \"goal\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ai.wisepilot.app/api/v1/ghl/agents/{id}/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"personality\": \"<string>\",\n \"instructions\": \"<string>\",\n \"goal\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "<string>",
"ghlAgentId": "<string>",
"name": "<string>",
"status": "<string>",
"activePromptVersion": {
"versionNumber": 123,
"promptText": "<string>",
"isActive": true
},
"createdAt": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": "Invalid API key",
"code": "INVALID_API_KEY"
}{
"success": false,
"error": "Not found"
}⌘I