curl --request PUT \
--url https://api.vogent.ai/api/agents/{agentId}/versioned_prompts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"aiModelId": "<string>",
"prompt": "<string>",
"flowDefinition": {
"nodes": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"transitionRules": [
{
"transitionNodeId": "<string>",
"field": "<string>",
"value": "<string>",
"values": [
"<string>"
]
}
],
"nodeData": {}
}
],
"globalContext": "<string>",
"aiOpen": true
},
"name": "<string>",
"modelOptionValues": [
{
"optionId": "<string>",
"value": "<string>"
}
]
}
'import requests
url = "https://api.vogent.ai/api/agents/{agentId}/versioned_prompts/{id}"
payload = {
"aiModelId": "<string>",
"prompt": "<string>",
"flowDefinition": {
"nodes": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"transitionRules": [
{
"transitionNodeId": "<string>",
"field": "<string>",
"value": "<string>",
"values": ["<string>"]
}
],
"nodeData": {}
}
],
"globalContext": "<string>",
"aiOpen": True
},
"name": "<string>",
"modelOptionValues": [
{
"optionId": "<string>",
"value": "<string>"
}
]
}
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({
aiModelId: '<string>',
prompt: '<string>',
flowDefinition: {
nodes: [
{
id: '<string>',
name: '<string>',
type: '<string>',
transitionRules: [
{
transitionNodeId: '<string>',
field: '<string>',
value: '<string>',
values: ['<string>']
}
],
nodeData: {}
}
],
globalContext: '<string>',
aiOpen: true
},
name: '<string>',
modelOptionValues: [{optionId: '<string>', value: '<string>'}]
})
};
fetch('https://api.vogent.ai/api/agents/{agentId}/versioned_prompts/{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://api.vogent.ai/api/agents/{agentId}/versioned_prompts/{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([
'aiModelId' => '<string>',
'prompt' => '<string>',
'flowDefinition' => [
'nodes' => [
[
'id' => '<string>',
'name' => '<string>',
'type' => '<string>',
'transitionRules' => [
[
'transitionNodeId' => '<string>',
'field' => '<string>',
'value' => '<string>',
'values' => [
'<string>'
]
]
],
'nodeData' => [
]
]
],
'globalContext' => '<string>',
'aiOpen' => true
],
'name' => '<string>',
'modelOptionValues' => [
[
'optionId' => '<string>',
'value' => '<string>'
]
]
]),
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.vogent.ai/api/agents/{agentId}/versioned_prompts/{id}"
payload := strings.NewReader("{\n \"aiModelId\": \"<string>\",\n \"prompt\": \"<string>\",\n \"flowDefinition\": {\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"transitionRules\": [\n {\n \"transitionNodeId\": \"<string>\",\n \"field\": \"<string>\",\n \"value\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"nodeData\": {}\n }\n ],\n \"globalContext\": \"<string>\",\n \"aiOpen\": true\n },\n \"name\": \"<string>\",\n \"modelOptionValues\": [\n {\n \"optionId\": \"<string>\",\n \"value\": \"<string>\"\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://api.vogent.ai/api/agents/{agentId}/versioned_prompts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"aiModelId\": \"<string>\",\n \"prompt\": \"<string>\",\n \"flowDefinition\": {\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"transitionRules\": [\n {\n \"transitionNodeId\": \"<string>\",\n \"field\": \"<string>\",\n \"value\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"nodeData\": {}\n }\n ],\n \"globalContext\": \"<string>\",\n \"aiOpen\": true\n },\n \"name\": \"<string>\",\n \"modelOptionValues\": [\n {\n \"optionId\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vogent.ai/api/agents/{agentId}/versioned_prompts/{id}")
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 \"aiModelId\": \"<string>\",\n \"prompt\": \"<string>\",\n \"flowDefinition\": {\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"transitionRules\": [\n {\n \"transitionNodeId\": \"<string>\",\n \"field\": \"<string>\",\n \"value\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"nodeData\": {}\n }\n ],\n \"globalContext\": \"<string>\",\n \"aiOpen\": true\n },\n \"name\": \"<string>\",\n \"modelOptionValues\": [\n {\n \"optionId\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"prompt": "<string>",
"flowDefinition": {
"nodes": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"transitionRules": [
{
"transitionNodeId": "<string>",
"field": "<string>",
"value": "<string>",
"values": [
"<string>"
]
}
],
"nodeData": {},
"outputSchema": "<string>"
}
],
"globalContext": "<string>",
"aiOpen": true
},
"aiModelId": "<string>",
"modelOptionValues": [
{
"optionId": "<string>",
"value": "<string>"
}
]
}Update versioned prompt
Updates a versioned prompt for a given agent.
curl --request PUT \
--url https://api.vogent.ai/api/agents/{agentId}/versioned_prompts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"aiModelId": "<string>",
"prompt": "<string>",
"flowDefinition": {
"nodes": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"transitionRules": [
{
"transitionNodeId": "<string>",
"field": "<string>",
"value": "<string>",
"values": [
"<string>"
]
}
],
"nodeData": {}
}
],
"globalContext": "<string>",
"aiOpen": true
},
"name": "<string>",
"modelOptionValues": [
{
"optionId": "<string>",
"value": "<string>"
}
]
}
'import requests
url = "https://api.vogent.ai/api/agents/{agentId}/versioned_prompts/{id}"
payload = {
"aiModelId": "<string>",
"prompt": "<string>",
"flowDefinition": {
"nodes": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"transitionRules": [
{
"transitionNodeId": "<string>",
"field": "<string>",
"value": "<string>",
"values": ["<string>"]
}
],
"nodeData": {}
}
],
"globalContext": "<string>",
"aiOpen": True
},
"name": "<string>",
"modelOptionValues": [
{
"optionId": "<string>",
"value": "<string>"
}
]
}
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({
aiModelId: '<string>',
prompt: '<string>',
flowDefinition: {
nodes: [
{
id: '<string>',
name: '<string>',
type: '<string>',
transitionRules: [
{
transitionNodeId: '<string>',
field: '<string>',
value: '<string>',
values: ['<string>']
}
],
nodeData: {}
}
],
globalContext: '<string>',
aiOpen: true
},
name: '<string>',
modelOptionValues: [{optionId: '<string>', value: '<string>'}]
})
};
fetch('https://api.vogent.ai/api/agents/{agentId}/versioned_prompts/{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://api.vogent.ai/api/agents/{agentId}/versioned_prompts/{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([
'aiModelId' => '<string>',
'prompt' => '<string>',
'flowDefinition' => [
'nodes' => [
[
'id' => '<string>',
'name' => '<string>',
'type' => '<string>',
'transitionRules' => [
[
'transitionNodeId' => '<string>',
'field' => '<string>',
'value' => '<string>',
'values' => [
'<string>'
]
]
],
'nodeData' => [
]
]
],
'globalContext' => '<string>',
'aiOpen' => true
],
'name' => '<string>',
'modelOptionValues' => [
[
'optionId' => '<string>',
'value' => '<string>'
]
]
]),
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.vogent.ai/api/agents/{agentId}/versioned_prompts/{id}"
payload := strings.NewReader("{\n \"aiModelId\": \"<string>\",\n \"prompt\": \"<string>\",\n \"flowDefinition\": {\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"transitionRules\": [\n {\n \"transitionNodeId\": \"<string>\",\n \"field\": \"<string>\",\n \"value\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"nodeData\": {}\n }\n ],\n \"globalContext\": \"<string>\",\n \"aiOpen\": true\n },\n \"name\": \"<string>\",\n \"modelOptionValues\": [\n {\n \"optionId\": \"<string>\",\n \"value\": \"<string>\"\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://api.vogent.ai/api/agents/{agentId}/versioned_prompts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"aiModelId\": \"<string>\",\n \"prompt\": \"<string>\",\n \"flowDefinition\": {\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"transitionRules\": [\n {\n \"transitionNodeId\": \"<string>\",\n \"field\": \"<string>\",\n \"value\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"nodeData\": {}\n }\n ],\n \"globalContext\": \"<string>\",\n \"aiOpen\": true\n },\n \"name\": \"<string>\",\n \"modelOptionValues\": [\n {\n \"optionId\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vogent.ai/api/agents/{agentId}/versioned_prompts/{id}")
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 \"aiModelId\": \"<string>\",\n \"prompt\": \"<string>\",\n \"flowDefinition\": {\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"transitionRules\": [\n {\n \"transitionNodeId\": \"<string>\",\n \"field\": \"<string>\",\n \"value\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"nodeData\": {}\n }\n ],\n \"globalContext\": \"<string>\",\n \"aiOpen\": true\n },\n \"name\": \"<string>\",\n \"modelOptionValues\": [\n {\n \"optionId\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"prompt": "<string>",
"flowDefinition": {
"nodes": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"transitionRules": [
{
"transitionNodeId": "<string>",
"field": "<string>",
"value": "<string>",
"values": [
"<string>"
]
}
],
"nodeData": {},
"outputSchema": "<string>"
}
],
"globalContext": "<string>",
"aiOpen": true
},
"aiModelId": "<string>",
"modelOptionValues": [
{
"optionId": "<string>",
"value": "<string>"
}
]
}Authorizations
In the form Bearer <api_key_here>. You can find your api key in your dashboard.
Body
Updates a versioned prompt
The ID of the model to use.
The type of agent that this prompt represents.
STANDARD, CUSTOM_FLOW For agents with agentType CUSTOM_FLOW, the flow definition that you want to use.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Successful operation
Unique identifier for the versioned prompt
Human-readable name for the versioned prompt
The type of agent this prompt is designed for (STANDARD or CUSTOM_FLOW)
STANDARD, CUSTOM_FLOW The actual prompt content that will be used by the agent. Can be null for CUSTOM_FLOW agent types
The flow definition for the agent. Only defined for CUSTOM_FLOW agent types.
Show child attributes
Show child attributes
The AI model ID to use for the agent.
Show child attributes
Show child attributes