curl --request PATCH \
--url https://{instance}.omniapp.co/api/v1/ai/eval/prompt-sets/{promptSetId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"name": "<string>",
"prompts": [
{
"prompt_text": "What are the top 10 products by revenue this quarter?",
"expectation": "The top product by revenue should be Aniseed Syrup.",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
'import requests
url = "https://{instance}.omniapp.co/api/v1/ai/eval/prompt-sets/{promptSetId}"
payload = {
"description": "<string>",
"name": "<string>",
"prompts": [
{
"prompt_text": "What are the top 10 products by revenue this quarter?",
"expectation": "The top product by revenue should be Aniseed Syrup.",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
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({
description: '<string>',
name: '<string>',
prompts: [
{
prompt_text: 'What are the top 10 products by revenue this quarter?',
expectation: 'The top product by revenue should be Aniseed Syrup.',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
]
})
};
fetch('https://{instance}.omniapp.co/api/v1/ai/eval/prompt-sets/{promptSetId}', 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://{instance}.omniapp.co/api/v1/ai/eval/prompt-sets/{promptSetId}",
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([
'description' => '<string>',
'name' => '<string>',
'prompts' => [
[
'prompt_text' => 'What are the top 10 products by revenue this quarter?',
'expectation' => 'The top product by revenue should be Aniseed Syrup.',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]),
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://{instance}.omniapp.co/api/v1/ai/eval/prompt-sets/{promptSetId}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"prompts\": [\n {\n \"prompt_text\": \"What are the top 10 products by revenue this quarter?\",\n \"expectation\": \"The top product by revenue should be Aniseed Syrup.\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\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://{instance}.omniapp.co/api/v1/ai/eval/prompt-sets/{promptSetId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"prompts\": [\n {\n \"prompt_text\": \"What are the top 10 products by revenue this quarter?\",\n \"expectation\": \"The top product by revenue should be Aniseed Syrup.\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.omniapp.co/api/v1/ai/eval/prompt-sets/{promptSetId}")
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 \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"prompts\": [\n {\n \"prompt_text\": \"What are the top 10 products by revenue this quarter?\",\n \"expectation\": \"The top product by revenue should be Aniseed Syrup.\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"prompt_set": {
"created_at": "2025-01-15T10:00:00.000Z",
"description": "Regression suite for the orders topic",
"id": "550e8400-e29b-41d4-a716-446655440000",
"is_archived": false,
"model_id": "880e8400-e29b-41d4-a716-446655440003",
"name": "Orders regression",
"prompts": [
{
"created_at": "2025-01-15T10:00:00.000Z",
"expectation": "The top product by revenue should be Aniseed Syrup.",
"id": "770e8400-e29b-41d4-a716-446655440002",
"prompt_text": "What are the top 5 products by revenue?",
"updated_at": "2025-01-15T10:00:00.000Z"
}
],
"slug": "orders-regression",
"updated_at": "2025-01-15T10:00:00.000Z"
}
}{
"detail": "Bad Request: name: Required",
"status": 400
}{
"detail": "Unauthorized: Missing or invalid API key",
"status": 401
}{
"detail": "AI eval requires at least Querier access on the model",
"status": 403
}{
"detail": "Prompt set not found",
"status": 404
}{
"detail": "A prompt being updated does not belong to this prompt set",
"status": 422
}Update an eval prompt set
Update a prompt set’s name, description, and/or prompts. When prompts is supplied, it fully replaces the existing list — existing prompts omitted from the list are deleted, entries without an id are created, and entries with a matching id are updated in place.
curl --request PATCH \
--url https://{instance}.omniapp.co/api/v1/ai/eval/prompt-sets/{promptSetId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"name": "<string>",
"prompts": [
{
"prompt_text": "What are the top 10 products by revenue this quarter?",
"expectation": "The top product by revenue should be Aniseed Syrup.",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
'import requests
url = "https://{instance}.omniapp.co/api/v1/ai/eval/prompt-sets/{promptSetId}"
payload = {
"description": "<string>",
"name": "<string>",
"prompts": [
{
"prompt_text": "What are the top 10 products by revenue this quarter?",
"expectation": "The top product by revenue should be Aniseed Syrup.",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
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({
description: '<string>',
name: '<string>',
prompts: [
{
prompt_text: 'What are the top 10 products by revenue this quarter?',
expectation: 'The top product by revenue should be Aniseed Syrup.',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
]
})
};
fetch('https://{instance}.omniapp.co/api/v1/ai/eval/prompt-sets/{promptSetId}', 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://{instance}.omniapp.co/api/v1/ai/eval/prompt-sets/{promptSetId}",
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([
'description' => '<string>',
'name' => '<string>',
'prompts' => [
[
'prompt_text' => 'What are the top 10 products by revenue this quarter?',
'expectation' => 'The top product by revenue should be Aniseed Syrup.',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]),
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://{instance}.omniapp.co/api/v1/ai/eval/prompt-sets/{promptSetId}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"prompts\": [\n {\n \"prompt_text\": \"What are the top 10 products by revenue this quarter?\",\n \"expectation\": \"The top product by revenue should be Aniseed Syrup.\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\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://{instance}.omniapp.co/api/v1/ai/eval/prompt-sets/{promptSetId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"prompts\": [\n {\n \"prompt_text\": \"What are the top 10 products by revenue this quarter?\",\n \"expectation\": \"The top product by revenue should be Aniseed Syrup.\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.omniapp.co/api/v1/ai/eval/prompt-sets/{promptSetId}")
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 \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"prompts\": [\n {\n \"prompt_text\": \"What are the top 10 products by revenue this quarter?\",\n \"expectation\": \"The top product by revenue should be Aniseed Syrup.\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"prompt_set": {
"created_at": "2025-01-15T10:00:00.000Z",
"description": "Regression suite for the orders topic",
"id": "550e8400-e29b-41d4-a716-446655440000",
"is_archived": false,
"model_id": "880e8400-e29b-41d4-a716-446655440003",
"name": "Orders regression",
"prompts": [
{
"created_at": "2025-01-15T10:00:00.000Z",
"expectation": "The top product by revenue should be Aniseed Syrup.",
"id": "770e8400-e29b-41d4-a716-446655440002",
"prompt_text": "What are the top 5 products by revenue?",
"updated_at": "2025-01-15T10:00:00.000Z"
}
],
"slug": "orders-regression",
"updated_at": "2025-01-15T10:00:00.000Z"
}
}{
"detail": "Bad Request: name: Required",
"status": 400
}{
"detail": "Unauthorized: Missing or invalid API key",
"status": 401
}{
"detail": "AI eval requires at least Querier access on the model",
"status": 403
}{
"detail": "Prompt set not found",
"status": 404
}{
"detail": "A prompt being updated does not belong to this prompt set",
"status": 422
}Authorizations
Can be either an Organization API Key or Personal Access Token (PAT).
Include in the Authorization header as: Bearer YOUR_TOKEN
Path Parameters
The unique identifier of the eval prompt set.
"550e8400-e29b-41d4-a716-446655440000"
Body
New description for the prompt set. Pass null to clear. Max 1024 characters.
1024New human-readable name for the prompt set. 255 characters or fewer.
1 - 255Full desired set of prompts after the update. Prompts omitted from this list are deleted; new prompts (no id) are appended in body order. Existing prompts retain their original position — reordering is not supported on this endpoint. At most 25 prompts total.
25Show child attributes
Show child attributes
Response
Prompt set updated successfully.
Show child attributes
Show child attributes
Was this page helpful?

