Update AI agent
curl --request PUT \
--url https://ai.pingmee.co.il/ai-agents/{id} \
--header 'Content-Type: application/json' \
--header 'Cookie: <api-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"roles": [
{
"name": "<string>",
"description": "<string>",
"instructions": "<string>",
"webhook": "<string>",
"allRequired": true,
"tool": {}
}
],
"vectorStore": {
"required": true
}
}
'import requests
url = "https://ai.pingmee.co.il/ai-agents/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"roles": [
{
"name": "<string>",
"description": "<string>",
"instructions": "<string>",
"webhook": "<string>",
"allRequired": True,
"tool": {}
}
],
"vectorStore": { "required": True }
}
headers = {
"Cookie": "<api-key>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
Cookie: '<api-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
description: '<string>',
roles: [
{
name: '<string>',
description: '<string>',
instructions: '<string>',
webhook: '<string>',
allRequired: true,
tool: {}
}
],
vectorStore: {required: true}
})
};
fetch('https://ai.pingmee.co.il/ai-agents/{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://ai.pingmee.co.il/ai-agents/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'roles' => [
[
'name' => '<string>',
'description' => '<string>',
'instructions' => '<string>',
'webhook' => '<string>',
'allRequired' => true,
'tool' => [
]
]
],
'vectorStore' => [
'required' => true
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Cookie: <api-key>",
"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://ai.pingmee.co.il/ai-agents/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"roles\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"instructions\": \"<string>\",\n \"webhook\": \"<string>\",\n \"allRequired\": true,\n \"tool\": {}\n }\n ],\n \"vectorStore\": {\n \"required\": true\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Cookie", "<api-key>")
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.put("https://ai.pingmee.co.il/ai-agents/{id}")
.header("Cookie", "<api-key>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"roles\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"instructions\": \"<string>\",\n \"webhook\": \"<string>\",\n \"allRequired\": true,\n \"tool\": {}\n }\n ],\n \"vectorStore\": {\n \"required\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ai.pingmee.co.il/ai-agents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Cookie"] = '<api-key>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"roles\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"instructions\": \"<string>\",\n \"webhook\": \"<string>\",\n \"allRequired\": true,\n \"tool\": {}\n }\n ],\n \"vectorStore\": {\n \"required\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "AIAgent '123' updated successfully."
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}AI Agents
Update AI Agent
Updates an AI agent. Supported fields: name, description, roles, and vectorStore.required. Changed roles regenerate their OpenAI function tools.
Field length limits (same as the Pingmee app; exceeding them returns 400):
| Field | Max length |
|---|---|
description | 5000 |
roles[].name | 40 |
roles[].description | 1500 |
roles[].instructions | 1500 |
roles[].webhook | 300 |
Path id must be URL-encoded.
PUT
/
ai-agents
/
{id}
Update AI agent
curl --request PUT \
--url https://ai.pingmee.co.il/ai-agents/{id} \
--header 'Content-Type: application/json' \
--header 'Cookie: <api-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"roles": [
{
"name": "<string>",
"description": "<string>",
"instructions": "<string>",
"webhook": "<string>",
"allRequired": true,
"tool": {}
}
],
"vectorStore": {
"required": true
}
}
'import requests
url = "https://ai.pingmee.co.il/ai-agents/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"roles": [
{
"name": "<string>",
"description": "<string>",
"instructions": "<string>",
"webhook": "<string>",
"allRequired": True,
"tool": {}
}
],
"vectorStore": { "required": True }
}
headers = {
"Cookie": "<api-key>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
Cookie: '<api-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
description: '<string>',
roles: [
{
name: '<string>',
description: '<string>',
instructions: '<string>',
webhook: '<string>',
allRequired: true,
tool: {}
}
],
vectorStore: {required: true}
})
};
fetch('https://ai.pingmee.co.il/ai-agents/{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://ai.pingmee.co.il/ai-agents/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'roles' => [
[
'name' => '<string>',
'description' => '<string>',
'instructions' => '<string>',
'webhook' => '<string>',
'allRequired' => true,
'tool' => [
]
]
],
'vectorStore' => [
'required' => true
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Cookie: <api-key>",
"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://ai.pingmee.co.il/ai-agents/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"roles\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"instructions\": \"<string>\",\n \"webhook\": \"<string>\",\n \"allRequired\": true,\n \"tool\": {}\n }\n ],\n \"vectorStore\": {\n \"required\": true\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Cookie", "<api-key>")
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.put("https://ai.pingmee.co.il/ai-agents/{id}")
.header("Cookie", "<api-key>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"roles\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"instructions\": \"<string>\",\n \"webhook\": \"<string>\",\n \"allRequired\": true,\n \"tool\": {}\n }\n ],\n \"vectorStore\": {\n \"required\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ai.pingmee.co.il/ai-agents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Cookie"] = '<api-key>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"roles\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"instructions\": \"<string>\",\n \"webhook\": \"<string>\",\n \"allRequired\": true,\n \"tool\": {}\n }\n ],\n \"vectorStore\": {\n \"required\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "AIAgent '123' updated successfully."
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Call this endpoint on the AI service:
https://ai.pingmee.co.il.name, description, roles, and vectorStore.required. When a role changes, its OpenAI function tool is regenerated automatically.
Field length limits
These match the Pingmee app. Requests that exceed them return400.
| Field | Max length |
|---|---|
description | 5000 |
roles[].name | 40 |
roles[].description | 1500 |
roles[].instructions | 1500 |
roles[].webhook | 300 |
Authorizations
Body
application/json
Fields to update on the AI agent
Partial update payload for an AI agent. Length limits: description 5000; role name 40; role description/instructions 1500; role webhook 300.
Last modified on August 18, 2026
Was this page helpful?