curl --request POST \ --url 'https://api-prod.usefini.com/v2/bots/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/hc-prompt/versions/public' \ --header 'Authorization: Bearer fini_your_api_key' \ --header 'Content-Type: application/json' \ --data '{ "hcPlanningPrompt": [ "Answer only from approved knowledge and escalate if unsure." ], "hcGuidelinePrompt": [ "Answer only from approved knowledge and escalate if unsure." ], "hcChannelPrompt": [ "Answer only from approved knowledge and escalate if unsure." ]}'
const response = await fetch('https://api-prod.usefini.com/v2/bots/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/hc-prompt/versions/public', { method: 'POST', headers: { Authorization: 'Bearer fini_your_api_key', 'Content-Type': 'application/json' }, body: JSON.stringify({ 'hcPlanningPrompt': [ 'Answer only from approved knowledge and escalate if unsure.' ], 'hcGuidelinePrompt': [ 'Answer only from approved knowledge and escalate if unsure.' ], 'hcChannelPrompt': [ 'Answer only from approved knowledge and escalate if unsure.' ]} )});const data = await response.json();
import requestsresponse = requests.post( "https://api-prod.usefini.com/v2/bots/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/hc-prompt/versions/public", headers={"Authorization": "Bearer fini_your_api_key", "Content-Type": "application/json"}, json={ "hcPlanningPrompt": [ "Answer only from approved knowledge and escalate if unsure." ], "hcGuidelinePrompt": [ "Answer only from approved knowledge and escalate if unsure." ], "hcChannelPrompt": [ "Answer only from approved knowledge and escalate if unsure." ]},)data = response.json()
Create a draft prompt version for one agent without publishing it.
POST
/
v2
/
bots
/
{id}
/
hc-prompt
/
versions
/
public
curl --request POST \ --url 'https://api-prod.usefini.com/v2/bots/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/hc-prompt/versions/public' \ --header 'Authorization: Bearer fini_your_api_key' \ --header 'Content-Type: application/json' \ --data '{ "hcPlanningPrompt": [ "Answer only from approved knowledge and escalate if unsure." ], "hcGuidelinePrompt": [ "Answer only from approved knowledge and escalate if unsure." ], "hcChannelPrompt": [ "Answer only from approved knowledge and escalate if unsure." ]}'
const response = await fetch('https://api-prod.usefini.com/v2/bots/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/hc-prompt/versions/public', { method: 'POST', headers: { Authorization: 'Bearer fini_your_api_key', 'Content-Type': 'application/json' }, body: JSON.stringify({ 'hcPlanningPrompt': [ 'Answer only from approved knowledge and escalate if unsure.' ], 'hcGuidelinePrompt': [ 'Answer only from approved knowledge and escalate if unsure.' ], 'hcChannelPrompt': [ 'Answer only from approved knowledge and escalate if unsure.' ]} )});const data = await response.json();
import requestsresponse = requests.post( "https://api-prod.usefini.com/v2/bots/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/hc-prompt/versions/public", headers={"Authorization": "Bearer fini_your_api_key", "Content-Type": "application/json"}, json={ "hcPlanningPrompt": [ "Answer only from approved knowledge and escalate if unsure." ], "hcGuidelinePrompt": [ "Answer only from approved knowledge and escalate if unsure." ], "hcChannelPrompt": [ "Answer only from approved knowledge and escalate if unsure." ]},)data = response.json()
Creates a draft prompt version for one agent and returns the stored draft version. Unlike Update prompts, this route stores a version with status: "DRAFT".Use this route when you want to stage prompt changes for review before they become the active prompt.
Headers
string
required
Bearer token containing your Fini workspace API key. Format: Bearer fini_... The key needs write scope.
string
required
application/json
Path parameters
string
required
Agent ID whose prompt version you want to draft. Use List agents to get the botId.
Body parameters
PromptSection[]
required
Full Planning Prompt section array. Send the complete array, not just the section you changed.
PromptSection[]
required
Full Main Guidelines section array.
PromptSection[]
required
Full Channel Prompt section array.
The body uses the same section shape as Update prompts. The returned object is a prompt-version row with draft metadata, not the merged template view returned by Get prompts.
curl --request POST \ --url 'https://api-prod.usefini.com/v2/bots/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/hc-prompt/versions/public' \ --header 'Authorization: Bearer fini_your_api_key' \ --header 'Content-Type: application/json' \ --data '{ "hcPlanningPrompt": [ "Answer only from approved knowledge and escalate if unsure." ], "hcGuidelinePrompt": [ "Answer only from approved knowledge and escalate if unsure." ], "hcChannelPrompt": [ "Answer only from approved knowledge and escalate if unsure." ]}'
const response = await fetch('https://api-prod.usefini.com/v2/bots/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/hc-prompt/versions/public', { method: 'POST', headers: { Authorization: 'Bearer fini_your_api_key', 'Content-Type': 'application/json' }, body: JSON.stringify({ 'hcPlanningPrompt': [ 'Answer only from approved knowledge and escalate if unsure.' ], 'hcGuidelinePrompt': [ 'Answer only from approved knowledge and escalate if unsure.' ], 'hcChannelPrompt': [ 'Answer only from approved knowledge and escalate if unsure.' ]} )});const data = await response.json();
import requestsresponse = requests.post( "https://api-prod.usefini.com/v2/bots/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/hc-prompt/versions/public", headers={"Authorization": "Bearer fini_your_api_key", "Content-Type": "application/json"}, json={ "hcPlanningPrompt": [ "Answer only from approved knowledge and escalate if unsure." ], "hcGuidelinePrompt": [ "Answer only from approved knowledge and escalate if unsure." ], "hcChannelPrompt": [ "Answer only from approved knowledge and escalate if unsure." ]},)data = response.json()