Update prompt version metadata
curl --request PATCH \
--url https://your-instance.example.com/api/prompts/{promptId}/versions/{versionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"displayVersion": "v1.5",
"title": "Tone tweak",
"description": "Softened opening line based on feedback."
}
'import requests
url = "https://your-instance.example.com/api/prompts/{promptId}/versions/{versionId}"
payload = {
"displayVersion": "v1.5",
"title": "Tone tweak",
"description": "Softened opening line based on feedback."
}
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({
displayVersion: 'v1.5',
title: 'Tone tweak',
description: 'Softened opening line based on feedback.'
})
};
fetch('https://your-instance.example.com/api/prompts/{promptId}/versions/{versionId}', 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}/versions/{versionId}",
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([
'displayVersion' => 'v1.5',
'title' => 'Tone tweak',
'description' => 'Softened opening line based on feedback.'
]),
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}/versions/{versionId}"
payload := strings.NewReader("{\n \"displayVersion\": \"v1.5\",\n \"title\": \"Tone tweak\",\n \"description\": \"Softened opening line based on feedback.\"\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://your-instance.example.com/api/prompts/{promptId}/versions/{versionId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"displayVersion\": \"v1.5\",\n \"title\": \"Tone tweak\",\n \"description\": \"Softened opening line based on feedback.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/prompts/{promptId}/versions/{versionId}")
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 \"displayVersion\": \"v1.5\",\n \"title\": \"Tone tweak\",\n \"description\": \"Softened opening line based on feedback.\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Prompt version updated successfully",
"version": {
"_id": "64d2f9c5e8a1d4e001a0b1d8",
"version": 5,
"label": "Pre-launch checkpoint (renamed)",
"displayVersion": "v1.4",
"title": "Pre-launch — final",
"description": "Renamed during launch retro.",
"source": "manual_save",
"createdAt": "2026-04-25T10:14:00.000Z"
}
}{
"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": "Prompt not found",
"details": "No prompt with id 5f7b1c2e8a1d4e0012c3b4a5 belongs to this user."
}Prompts
Update prompt version metadata
Updates editable metadata fields (displayVersion, title, description) on a prompt version. Passing an explicit null clears the field; at least one field must be supplied.
PATCH
/
api
/
prompts
/
{promptId}
/
versions
/
{versionId}
Update prompt version metadata
curl --request PATCH \
--url https://your-instance.example.com/api/prompts/{promptId}/versions/{versionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"displayVersion": "v1.5",
"title": "Tone tweak",
"description": "Softened opening line based on feedback."
}
'import requests
url = "https://your-instance.example.com/api/prompts/{promptId}/versions/{versionId}"
payload = {
"displayVersion": "v1.5",
"title": "Tone tweak",
"description": "Softened opening line based on feedback."
}
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({
displayVersion: 'v1.5',
title: 'Tone tweak',
description: 'Softened opening line based on feedback.'
})
};
fetch('https://your-instance.example.com/api/prompts/{promptId}/versions/{versionId}', 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}/versions/{versionId}",
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([
'displayVersion' => 'v1.5',
'title' => 'Tone tweak',
'description' => 'Softened opening line based on feedback.'
]),
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}/versions/{versionId}"
payload := strings.NewReader("{\n \"displayVersion\": \"v1.5\",\n \"title\": \"Tone tweak\",\n \"description\": \"Softened opening line based on feedback.\"\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://your-instance.example.com/api/prompts/{promptId}/versions/{versionId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"displayVersion\": \"v1.5\",\n \"title\": \"Tone tweak\",\n \"description\": \"Softened opening line based on feedback.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/prompts/{promptId}/versions/{versionId}")
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 \"displayVersion\": \"v1.5\",\n \"title\": \"Tone tweak\",\n \"description\": \"Softened opening line based on feedback.\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Prompt version updated successfully",
"version": {
"_id": "64d2f9c5e8a1d4e001a0b1d8",
"version": 5,
"label": "Pre-launch checkpoint (renamed)",
"displayVersion": "v1.4",
"title": "Pre-launch — final",
"description": "Renamed during launch retro.",
"source": "manual_save",
"createdAt": "2026-04-25T10:14:00.000Z"
}
}{
"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": "Prompt not found",
"details": "No prompt with id 5f7b1c2e8a1d4e0012c3b4a5 belongs to this user."
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Prompt version updated successfully
Returned by PATCH /api/prompts/{promptId}/versions/{versionId}.
Show child attributes
Show child attributes
Example:
{
"_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>..."
}
⌘I