curl --request PUT \
--url https://your-instance.example.com/api/prompts/{promptId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Leasing follow-up assistant (v2)",
"prompt": "<prompt><role>Leasing assistant</role><goal>Be friendly, concise, and confirm next steps.</goal></prompt>",
"description": "Refined tone; clearer next-step CTA.",
"temperature": 0.6,
"responseTime": 30,
"tools": [
{
"name": "book_tour"
}
],
"toolConfigs": {
"book_tour": {
"requireApproval": true
}
}
}
'import requests
url = "https://your-instance.example.com/api/prompts/{promptId}"
payload = {
"name": "Leasing follow-up assistant (v2)",
"prompt": "<prompt><role>Leasing assistant</role><goal>Be friendly, concise, and confirm next steps.</goal></prompt>",
"description": "Refined tone; clearer next-step CTA.",
"temperature": 0.6,
"responseTime": 30,
"tools": [{ "name": "book_tour" }],
"toolConfigs": { "book_tour": { "requireApproval": True } }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Leasing follow-up assistant (v2)',
prompt: '<prompt><role>Leasing assistant</role><goal>Be friendly, concise, and confirm next steps.</goal></prompt>',
description: 'Refined tone; clearer next-step CTA.',
temperature: 0.6,
responseTime: 30,
tools: [{name: 'book_tour'}],
toolConfigs: {book_tour: {requireApproval: true}}
})
};
fetch('https://your-instance.example.com/api/prompts/{promptId}', 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://your-instance.example.com/api/prompts/{promptId}",
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' => 'Leasing follow-up assistant (v2)',
'prompt' => '<prompt><role>Leasing assistant</role><goal>Be friendly, concise, and confirm next steps.</goal></prompt>',
'description' => 'Refined tone; clearer next-step CTA.',
'temperature' => 0.6,
'responseTime' => 30,
'tools' => [
[
'name' => 'book_tour'
]
],
'toolConfigs' => [
'book_tour' => [
'requireApproval' => true
]
]
]),
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://your-instance.example.com/api/prompts/{promptId}"
payload := strings.NewReader("{\n \"name\": \"Leasing follow-up assistant (v2)\",\n \"prompt\": \"<prompt><role>Leasing assistant</role><goal>Be friendly, concise, and confirm next steps.</goal></prompt>\",\n \"description\": \"Refined tone; clearer next-step CTA.\",\n \"temperature\": 0.6,\n \"responseTime\": 30,\n \"tools\": [\n {\n \"name\": \"book_tour\"\n }\n ],\n \"toolConfigs\": {\n \"book_tour\": {\n \"requireApproval\": true\n }\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://your-instance.example.com/api/prompts/{promptId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Leasing follow-up assistant (v2)\",\n \"prompt\": \"<prompt><role>Leasing assistant</role><goal>Be friendly, concise, and confirm next steps.</goal></prompt>\",\n \"description\": \"Refined tone; clearer next-step CTA.\",\n \"temperature\": 0.6,\n \"responseTime\": 30,\n \"tools\": [\n {\n \"name\": \"book_tour\"\n }\n ],\n \"toolConfigs\": {\n \"book_tour\": {\n \"requireApproval\": true\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/prompts/{promptId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Leasing follow-up assistant (v2)\",\n \"prompt\": \"<prompt><role>Leasing assistant</role><goal>Be friendly, concise, and confirm next steps.</goal></prompt>\",\n \"description\": \"Refined tone; clearer next-step CTA.\",\n \"temperature\": 0.6,\n \"responseTime\": 30,\n \"tools\": [\n {\n \"name\": \"book_tour\"\n }\n ],\n \"toolConfigs\": {\n \"book_tour\": {\n \"requireApproval\": true\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "Prompt updated successfully",
"prompt": {
"_id": "64d2f9c5e8a1d4e001a0b1c2",
"name": "Maple Court — Tour confirm",
"prompt": "<prompt>updated body</prompt>",
"temperature": 0.4,
"lastEditedAt": "2026-05-20T15:04:01.135Z"
},
"versionSnapshot": {
"_id": "64d2f9c5e8a1d4e001a0b1d8",
"version": 6,
"displayVersion": "v1.5",
"createdAt": "2026-05-20T15:04:01.135Z"
}
}{
"error": "Prompt not found",
"details": "No prompt with id 5f7b1c2e8a1d4e0012c3b4a5 belongs to this user."
}{
"error": "Prompt not found",
"details": "No prompt with id 5f7b1c2e8a1d4e0012c3b4a5 belongs to this user."
}{
"error": "Prompt not found",
"details": "No prompt with id 5f7b1c2e8a1d4e0012c3b4a5 belongs to this user."
}{
"error": "This agent is currently assigned to one or more SMS conversations and the newly required approval tools would change its surface.",
"code": "SMS_APPROVAL_CONFLICT",
"conflict": {
"promptId": "64d2f9c5e8a1d4e001a0b1c2",
"promptName": "Maple Court — Tour confirm",
"newlyApprovalRequiredTools": [
"sendSms",
"transferCall"
],
"conversationsCount": 12,
"contactsCount": 9,
"hasAlternatives": true,
"alternatives": [
{
"id": "64d2f9c5e8a1d4e001a0b1c3",
"name": "Maple Court — Tour confirm (no approval)",
"description": "Variant without approval-required tools."
}
]
}
}Update a user prompt
Updates editable fields on a prompt the caller owns. Prompt text, name, description, temperature/responseTime, tools and toolConfigs are mutable here; versioning is handled separately via the /versions endpoints.
curl --request PUT \
--url https://your-instance.example.com/api/prompts/{promptId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Leasing follow-up assistant (v2)",
"prompt": "<prompt><role>Leasing assistant</role><goal>Be friendly, concise, and confirm next steps.</goal></prompt>",
"description": "Refined tone; clearer next-step CTA.",
"temperature": 0.6,
"responseTime": 30,
"tools": [
{
"name": "book_tour"
}
],
"toolConfigs": {
"book_tour": {
"requireApproval": true
}
}
}
'import requests
url = "https://your-instance.example.com/api/prompts/{promptId}"
payload = {
"name": "Leasing follow-up assistant (v2)",
"prompt": "<prompt><role>Leasing assistant</role><goal>Be friendly, concise, and confirm next steps.</goal></prompt>",
"description": "Refined tone; clearer next-step CTA.",
"temperature": 0.6,
"responseTime": 30,
"tools": [{ "name": "book_tour" }],
"toolConfigs": { "book_tour": { "requireApproval": True } }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Leasing follow-up assistant (v2)',
prompt: '<prompt><role>Leasing assistant</role><goal>Be friendly, concise, and confirm next steps.</goal></prompt>',
description: 'Refined tone; clearer next-step CTA.',
temperature: 0.6,
responseTime: 30,
tools: [{name: 'book_tour'}],
toolConfigs: {book_tour: {requireApproval: true}}
})
};
fetch('https://your-instance.example.com/api/prompts/{promptId}', 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://your-instance.example.com/api/prompts/{promptId}",
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' => 'Leasing follow-up assistant (v2)',
'prompt' => '<prompt><role>Leasing assistant</role><goal>Be friendly, concise, and confirm next steps.</goal></prompt>',
'description' => 'Refined tone; clearer next-step CTA.',
'temperature' => 0.6,
'responseTime' => 30,
'tools' => [
[
'name' => 'book_tour'
]
],
'toolConfigs' => [
'book_tour' => [
'requireApproval' => true
]
]
]),
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://your-instance.example.com/api/prompts/{promptId}"
payload := strings.NewReader("{\n \"name\": \"Leasing follow-up assistant (v2)\",\n \"prompt\": \"<prompt><role>Leasing assistant</role><goal>Be friendly, concise, and confirm next steps.</goal></prompt>\",\n \"description\": \"Refined tone; clearer next-step CTA.\",\n \"temperature\": 0.6,\n \"responseTime\": 30,\n \"tools\": [\n {\n \"name\": \"book_tour\"\n }\n ],\n \"toolConfigs\": {\n \"book_tour\": {\n \"requireApproval\": true\n }\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://your-instance.example.com/api/prompts/{promptId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Leasing follow-up assistant (v2)\",\n \"prompt\": \"<prompt><role>Leasing assistant</role><goal>Be friendly, concise, and confirm next steps.</goal></prompt>\",\n \"description\": \"Refined tone; clearer next-step CTA.\",\n \"temperature\": 0.6,\n \"responseTime\": 30,\n \"tools\": [\n {\n \"name\": \"book_tour\"\n }\n ],\n \"toolConfigs\": {\n \"book_tour\": {\n \"requireApproval\": true\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/prompts/{promptId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Leasing follow-up assistant (v2)\",\n \"prompt\": \"<prompt><role>Leasing assistant</role><goal>Be friendly, concise, and confirm next steps.</goal></prompt>\",\n \"description\": \"Refined tone; clearer next-step CTA.\",\n \"temperature\": 0.6,\n \"responseTime\": 30,\n \"tools\": [\n {\n \"name\": \"book_tour\"\n }\n ],\n \"toolConfigs\": {\n \"book_tour\": {\n \"requireApproval\": true\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "Prompt updated successfully",
"prompt": {
"_id": "64d2f9c5e8a1d4e001a0b1c2",
"name": "Maple Court — Tour confirm",
"prompt": "<prompt>updated body</prompt>",
"temperature": 0.4,
"lastEditedAt": "2026-05-20T15:04:01.135Z"
},
"versionSnapshot": {
"_id": "64d2f9c5e8a1d4e001a0b1d8",
"version": 6,
"displayVersion": "v1.5",
"createdAt": "2026-05-20T15:04:01.135Z"
}
}{
"error": "Prompt not found",
"details": "No prompt with id 5f7b1c2e8a1d4e0012c3b4a5 belongs to this user."
}{
"error": "Prompt not found",
"details": "No prompt with id 5f7b1c2e8a1d4e0012c3b4a5 belongs to this user."
}{
"error": "Prompt not found",
"details": "No prompt with id 5f7b1c2e8a1d4e0012c3b4a5 belongs to this user."
}{
"error": "This agent is currently assigned to one or more SMS conversations and the newly required approval tools would change its surface.",
"code": "SMS_APPROVAL_CONFLICT",
"conflict": {
"promptId": "64d2f9c5e8a1d4e001a0b1c2",
"promptName": "Maple Court — Tour confirm",
"newlyApprovalRequiredTools": [
"sendSms",
"transferCall"
],
"conversationsCount": 12,
"contactsCount": 9,
"hasAlternatives": true,
"alternatives": [
{
"id": "64d2f9c5e8a1d4e001a0b1c3",
"name": "Maple Court — Tour confirm (no approval)",
"description": "Variant without approval-required tools."
}
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Human-readable prompt name shown in pickers and lists.
XML prompt body driving the AI agent.
Target reply latency in seconds; the engine throttles streaming to roughly this duration.
Short summary of the prompt's purpose; surfaced in summary lists and pickers.
Sampling temperature (0-1). Lower = more deterministic.
Enabled tool keys (e.g. getContact, sendSms, transfer).
Per-tool config overrides keyed by tool name.
Response
Prompt updated successfully (may include a versionSnapshot when a checkpoint was captured)
versionSnapshot is only present when the update created a version checkpoint as a side-effect (e.g. autosave thresholds).
Prompt document as stored in the Prompt collection. Returned shape varies slightly per endpoint (some list/summary endpoints project a subset of fields).
Show child attributes
Show child attributes
{
"_id": "5f7b1c2e8a1d4e0012c3b4a5",
"name": "Leasing follow-up assistant",
"prompt": "<prompt><role>Leasing assistant</role><goal>Re-engage leads 24h after their last reply.</goal></prompt>",
"description": "Follow up with leads 24h after their last response.",
"temperature": 0.7,
"responseTime": 45,
"isHidden": false,
"tools": [{ "name": "book_tour" }],
"toolConfigs": { "book_tour": { "requireApproval": true } },
"organizationId": "64a1b2c3d4e5f60012345678",
"userId": "64a1b2c3d4e5f60012345679",
"createdAt": "2026-03-12T14:22:10.000Z",
"updatedAt": "2026-04-22T10:14:00.000Z"
}
Show child attributes
Show child attributes
{
"_id": "65f9b1c2e8a1d4e001a0b1c3",
"version": 4,
"label": "Friendlier tone",
"displayVersion": "v1.3",
"title": "Tone update",
"description": "Softened the opening line.",
"source": "manual_save",
"createdAt": "2026-04-22T10:14:00.000Z",
"matchesCurrentPrompt": true,
"preview": "<prompt><role>Leasing assistant</role>..."
}