Update Prompt
Partially update a prompt’s title, icon, config, messages, tools, or playgrounds.
curl --request PATCH \
--url https://api.adaline.ai/v2/prompts/{promptId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"config": {
"provider": "<string>",
"model": "<string>",
"settings": {}
},
"messages": [
{
"content": [
{
"modality": "text",
"value": "<string>"
}
]
}
],
"tools": [
{
"type": "function",
"definition": {
"schema": {
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": true
}
},
"request": {
"type": "http",
"url": "<string>",
"headers": {},
"query": {},
"body": {},
"proxyUrl": "<string>",
"proxyHeaders": {},
"retry": {
"maxAttempts": 2,
"initialDelay": 2,
"exponentialFactor": 2
}
}
}
],
"playgrounds": {}
}
'import requests
url = "https://api.adaline.ai/v2/prompts/{promptId}"
payload = {
"title": "<string>",
"config": {
"provider": "<string>",
"model": "<string>",
"settings": {}
},
"messages": [{ "content": [
{
"modality": "text",
"value": "<string>"
}
] }],
"tools": [
{
"type": "function",
"definition": { "schema": {
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": True
} },
"request": {
"type": "http",
"url": "<string>",
"headers": {},
"query": {},
"body": {},
"proxyUrl": "<string>",
"proxyHeaders": {},
"retry": {
"maxAttempts": 2,
"initialDelay": 2,
"exponentialFactor": 2
}
}
}
],
"playgrounds": {}
}
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({
title: '<string>',
config: {provider: '<string>', model: '<string>', settings: {}},
messages: [{content: [{modality: 'text', value: '<string>'}]}],
tools: [
{
type: 'function',
definition: {
schema: {name: '<string>', description: '<string>', parameters: {}, strict: true}
},
request: {
type: 'http',
url: '<string>',
headers: {},
query: {},
body: JSON.stringify({}),
proxyUrl: '<string>',
proxyHeaders: {},
retry: {maxAttempts: 2, initialDelay: 2, exponentialFactor: 2}
}
}
],
playgrounds: {}
})
};
fetch('https://api.adaline.ai/v2/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://api.adaline.ai/v2/prompts/{promptId}",
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([
'title' => '<string>',
'config' => [
'provider' => '<string>',
'model' => '<string>',
'settings' => [
]
],
'messages' => [
[
'content' => [
[
'modality' => 'text',
'value' => '<string>'
]
]
]
],
'tools' => [
[
'type' => 'function',
'definition' => [
'schema' => [
'name' => '<string>',
'description' => '<string>',
'parameters' => [
],
'strict' => true
]
],
'request' => [
'type' => 'http',
'url' => '<string>',
'headers' => [
],
'query' => [
],
'body' => [
],
'proxyUrl' => '<string>',
'proxyHeaders' => [
],
'retry' => [
'maxAttempts' => 2,
'initialDelay' => 2,
'exponentialFactor' => 2
]
]
]
],
'playgrounds' => [
]
]),
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://api.adaline.ai/v2/prompts/{promptId}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"config\": {\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"settings\": {}\n },\n \"messages\": [\n {\n \"content\": [\n {\n \"modality\": \"text\",\n \"value\": \"<string>\"\n }\n ]\n }\n ],\n \"tools\": [\n {\n \"type\": \"function\",\n \"definition\": {\n \"schema\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n },\n \"request\": {\n \"type\": \"http\",\n \"url\": \"<string>\",\n \"headers\": {},\n \"query\": {},\n \"body\": {},\n \"proxyUrl\": \"<string>\",\n \"proxyHeaders\": {},\n \"retry\": {\n \"maxAttempts\": 2,\n \"initialDelay\": 2,\n \"exponentialFactor\": 2\n }\n }\n }\n ],\n \"playgrounds\": {}\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://api.adaline.ai/v2/prompts/{promptId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"config\": {\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"settings\": {}\n },\n \"messages\": [\n {\n \"content\": [\n {\n \"modality\": \"text\",\n \"value\": \"<string>\"\n }\n ]\n }\n ],\n \"tools\": [\n {\n \"type\": \"function\",\n \"definition\": {\n \"schema\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n },\n \"request\": {\n \"type\": \"http\",\n \"url\": \"<string>\",\n \"headers\": {},\n \"query\": {},\n \"body\": {},\n \"proxyUrl\": \"<string>\",\n \"proxyHeaders\": {},\n \"retry\": {\n \"maxAttempts\": 2,\n \"initialDelay\": 2,\n \"exponentialFactor\": 2\n }\n }\n }\n ],\n \"playgrounds\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.adaline.ai/v2/prompts/{promptId}")
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 \"title\": \"<string>\",\n \"config\": {\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"settings\": {}\n },\n \"messages\": [\n {\n \"content\": [\n {\n \"modality\": \"text\",\n \"value\": \"<string>\"\n }\n ]\n }\n ],\n \"tools\": [\n {\n \"type\": \"function\",\n \"definition\": {\n \"schema\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n },\n \"request\": {\n \"type\": \"http\",\n \"url\": \"<string>\",\n \"headers\": {},\n \"query\": {},\n \"body\": {},\n \"proxyUrl\": \"<string>\",\n \"proxyHeaders\": {},\n \"retry\": {\n \"maxAttempts\": 2,\n \"initialDelay\": 2,\n \"exponentialFactor\": 2\n }\n }\n }\n ],\n \"playgrounds\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"title": "<string>",
"icon": {
"value": "<string>"
},
"projectId": "<string>",
"createdAt": 17450965800000,
"updatedAt": 17450965800000,
"defaultPlaygroundId": "<string>",
"draft": {
"config": {
"provider": "<string>",
"model": "<string>",
"settings": {}
},
"messages": [
{
"content": [
{
"modality": "text",
"value": "<string>"
}
]
}
],
"tools": [
{
"type": "function",
"definition": {
"schema": {
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": true
}
},
"request": {
"type": "http",
"url": "<string>",
"headers": {},
"query": {},
"body": {},
"proxyUrl": "<string>",
"proxyHeaders": {},
"retry": {
"maxAttempts": 2,
"initialDelay": 2,
"exponentialFactor": 2
}
}
}
],
"variables": {}
},
"contentLinks": {},
"defaultPlayground": {
"id": "<string>",
"messages": [
{
"content": [
{
"modality": "text",
"value": "<string>"
}
]
}
],
"variables": {},
"title": "<string>"
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Workspace API key. Pass as Authorization: Bearer <key>.
Path Parameters
Unique identifier for an entity, between 20 and 80 characters.
20 - 80Query Parameters
Unique identifier for an entity, between 20 and 80 characters.
20 - 80Body
Display title for an entity, up to 50 characters.
1 - 50Icon for an entity, either an emoji or an image URL. Discriminated by type.
Show child attributes
Show child attributes
Provider and model configuration for a prompt.
Show child attributes
Show child attributes
Array of prompt messages.
Show child attributes
Show child attributes
Array of tool definitions available to the model.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Prompt updated.
A complete prompt with draft, playground, and published versions.
Unique identifier for an entity, between 20 and 80 characters.
20 - 80Display title for an entity, up to 50 characters.
1 - 50Icon for an entity, either an emoji or an image URL. Discriminated by type.
Show child attributes
Show child attributes
Unique identifier for an entity, between 20 and 80 characters.
20 - 80Unix timestamp in milliseconds.
1672511400000 <= x <= 33229420200000Unix timestamp in milliseconds.
1672511400000 <= x <= 33229420200000Unique identifier for an entity, between 20 and 80 characters.
20 - 80A draft version of a prompt with config, messages, tools, and variables.
Show child attributes
Show child attributes
Map of content links (base64 content -> signed URL).
Show child attributes
Show child attributes
A prompt playground configuration with model settings and messages.
Show child attributes
Show child attributes
Was this page helpful?
curl --request PATCH \
--url https://api.adaline.ai/v2/prompts/{promptId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"config": {
"provider": "<string>",
"model": "<string>",
"settings": {}
},
"messages": [
{
"content": [
{
"modality": "text",
"value": "<string>"
}
]
}
],
"tools": [
{
"type": "function",
"definition": {
"schema": {
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": true
}
},
"request": {
"type": "http",
"url": "<string>",
"headers": {},
"query": {},
"body": {},
"proxyUrl": "<string>",
"proxyHeaders": {},
"retry": {
"maxAttempts": 2,
"initialDelay": 2,
"exponentialFactor": 2
}
}
}
],
"playgrounds": {}
}
'import requests
url = "https://api.adaline.ai/v2/prompts/{promptId}"
payload = {
"title": "<string>",
"config": {
"provider": "<string>",
"model": "<string>",
"settings": {}
},
"messages": [{ "content": [
{
"modality": "text",
"value": "<string>"
}
] }],
"tools": [
{
"type": "function",
"definition": { "schema": {
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": True
} },
"request": {
"type": "http",
"url": "<string>",
"headers": {},
"query": {},
"body": {},
"proxyUrl": "<string>",
"proxyHeaders": {},
"retry": {
"maxAttempts": 2,
"initialDelay": 2,
"exponentialFactor": 2
}
}
}
],
"playgrounds": {}
}
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({
title: '<string>',
config: {provider: '<string>', model: '<string>', settings: {}},
messages: [{content: [{modality: 'text', value: '<string>'}]}],
tools: [
{
type: 'function',
definition: {
schema: {name: '<string>', description: '<string>', parameters: {}, strict: true}
},
request: {
type: 'http',
url: '<string>',
headers: {},
query: {},
body: JSON.stringify({}),
proxyUrl: '<string>',
proxyHeaders: {},
retry: {maxAttempts: 2, initialDelay: 2, exponentialFactor: 2}
}
}
],
playgrounds: {}
})
};
fetch('https://api.adaline.ai/v2/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://api.adaline.ai/v2/prompts/{promptId}",
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([
'title' => '<string>',
'config' => [
'provider' => '<string>',
'model' => '<string>',
'settings' => [
]
],
'messages' => [
[
'content' => [
[
'modality' => 'text',
'value' => '<string>'
]
]
]
],
'tools' => [
[
'type' => 'function',
'definition' => [
'schema' => [
'name' => '<string>',
'description' => '<string>',
'parameters' => [
],
'strict' => true
]
],
'request' => [
'type' => 'http',
'url' => '<string>',
'headers' => [
],
'query' => [
],
'body' => [
],
'proxyUrl' => '<string>',
'proxyHeaders' => [
],
'retry' => [
'maxAttempts' => 2,
'initialDelay' => 2,
'exponentialFactor' => 2
]
]
]
],
'playgrounds' => [
]
]),
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://api.adaline.ai/v2/prompts/{promptId}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"config\": {\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"settings\": {}\n },\n \"messages\": [\n {\n \"content\": [\n {\n \"modality\": \"text\",\n \"value\": \"<string>\"\n }\n ]\n }\n ],\n \"tools\": [\n {\n \"type\": \"function\",\n \"definition\": {\n \"schema\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n },\n \"request\": {\n \"type\": \"http\",\n \"url\": \"<string>\",\n \"headers\": {},\n \"query\": {},\n \"body\": {},\n \"proxyUrl\": \"<string>\",\n \"proxyHeaders\": {},\n \"retry\": {\n \"maxAttempts\": 2,\n \"initialDelay\": 2,\n \"exponentialFactor\": 2\n }\n }\n }\n ],\n \"playgrounds\": {}\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://api.adaline.ai/v2/prompts/{promptId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"config\": {\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"settings\": {}\n },\n \"messages\": [\n {\n \"content\": [\n {\n \"modality\": \"text\",\n \"value\": \"<string>\"\n }\n ]\n }\n ],\n \"tools\": [\n {\n \"type\": \"function\",\n \"definition\": {\n \"schema\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n },\n \"request\": {\n \"type\": \"http\",\n \"url\": \"<string>\",\n \"headers\": {},\n \"query\": {},\n \"body\": {},\n \"proxyUrl\": \"<string>\",\n \"proxyHeaders\": {},\n \"retry\": {\n \"maxAttempts\": 2,\n \"initialDelay\": 2,\n \"exponentialFactor\": 2\n }\n }\n }\n ],\n \"playgrounds\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.adaline.ai/v2/prompts/{promptId}")
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 \"title\": \"<string>\",\n \"config\": {\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"settings\": {}\n },\n \"messages\": [\n {\n \"content\": [\n {\n \"modality\": \"text\",\n \"value\": \"<string>\"\n }\n ]\n }\n ],\n \"tools\": [\n {\n \"type\": \"function\",\n \"definition\": {\n \"schema\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n },\n \"request\": {\n \"type\": \"http\",\n \"url\": \"<string>\",\n \"headers\": {},\n \"query\": {},\n \"body\": {},\n \"proxyUrl\": \"<string>\",\n \"proxyHeaders\": {},\n \"retry\": {\n \"maxAttempts\": 2,\n \"initialDelay\": 2,\n \"exponentialFactor\": 2\n }\n }\n }\n ],\n \"playgrounds\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"title": "<string>",
"icon": {
"value": "<string>"
},
"projectId": "<string>",
"createdAt": 17450965800000,
"updatedAt": 17450965800000,
"defaultPlaygroundId": "<string>",
"draft": {
"config": {
"provider": "<string>",
"model": "<string>",
"settings": {}
},
"messages": [
{
"content": [
{
"modality": "text",
"value": "<string>"
}
]
}
],
"tools": [
{
"type": "function",
"definition": {
"schema": {
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": true
}
},
"request": {
"type": "http",
"url": "<string>",
"headers": {},
"query": {},
"body": {},
"proxyUrl": "<string>",
"proxyHeaders": {},
"retry": {
"maxAttempts": 2,
"initialDelay": 2,
"exponentialFactor": 2
}
}
}
],
"variables": {}
},
"contentLinks": {},
"defaultPlayground": {
"id": "<string>",
"messages": [
{
"content": [
{
"modality": "text",
"value": "<string>"
}
]
}
],
"variables": {},
"title": "<string>"
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}