> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usefini.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get prompt version
> Fetch one saved prompt version for an agent.
Returns one saved prompt version as a merged view of that version plus the current workspace template.
<Note>
Use [Get prompt history](/en/api-reference/get-prompt-history) to find saved `promptId` values. Template sections missing from the saved version are included in this response with merged-read helper fields such as `defaultPrompt` and `custom`.
</Note>
## Headers
<ParamField header="Authorization" type="string" required>
Bearer token containing your Fini workspace API key. Format: `Bearer fini_...` The key needs `read` scope.
</ParamField>
## Path parameters
<ParamField path="id" type="string" required>
Agent ID that owns the prompt version. Use [List agents](/en/api-reference/list-agents) to get the `botId`.
</ParamField>
<ParamField path="promptId" type="string" required>
Saved prompt version ID returned by [Get prompt history](/en/api-reference/get-prompt-history).
</ParamField>
## Response
Returns one merged [`Prompt`](/en/api-reference/prompts#prompt-object) object.
<RequestExample>
~~~bash cURL theme={null}
curl --request GET \
--url 'https://api-prod.usefini.com/v2/bots/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/hc-prompt/9c59b2df-5d5f-4c9e-a070-9ac3c2b1b24e/public' \
--header 'Authorization: Bearer fini_your_api_key'
~~~
~~~javascript Node.js theme={null}
const response = await fetch('https://api-prod.usefini.com/v2/bots/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/hc-prompt/9c59b2df-5d5f-4c9e-a070-9ac3c2b1b24e/public', {
method: 'GET',
headers: {
Authorization: 'Bearer fini_your_api_key'
}
});
const data = await response.json();
~~~
~~~python Python theme={null}
import requests
response = requests.get(
"https://api-prod.usefini.com/v2/bots/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/hc-prompt/9c59b2df-5d5f-4c9e-a070-9ac3c2b1b24e/public",
headers={"Authorization": "Bearer fini_your_api_key"},
)
data = response.json()
~~~
</RequestExample>
<ResponseExample>
~~~json 200 OK theme={null}
{
"id": "9c59b2df-5d5f-4c9e-a070-9ac3c2b1b24e",
"botId": "2a1cf0f0-f35d-46ad-8e61-a15c86b2b312",
"createdAt": "2026-07-28T08:55:32.000Z",
"createdBy": "api",
"hcPlanningPrompt": [
{
"id": "planning-main",
"name": "Planning",
"description": "How the agent plans an answer.",
"enabled": true,
"custom": true,
"subsections": [
{
"id": "planning-grounding",
"name": "Grounding",
"prompt": "Use approved knowledge before answering.",
"defaultPrompt": "Use retrieved knowledge before answering.",
"useDefault": false,
"enabled": true,
"custom": true
}
]
}
],
"hcGuidelinePrompt": [
{
"id": "guidelines-main",
"name": "Main Guidelines",
"description": "Global answer behavior.",
"enabled": true,
"custom": true,
"subsections": [
{
"id": "guidelines-escalation",
"name": "Escalation",
"prompt": "Escalate billing disputes when policy is unclear.",
"defaultPrompt": "Escalate when unsure.",
"useDefault": false,
"enabled": true,
"custom": true
}
]
}
],
"hcChannelPrompt": [
{
"id": "channel-chat",
"name": "Chat",
"description": "Chat-specific behavior.",
"enabled": true,
"custom": false,
"subsections": [
{
"id": "channel-chat-style",
"name": "Tone",
"prompt": "Keep replies concise and grounded in approved knowledge.",
"defaultPrompt": "Keep replies helpful and concise.",
"useDefault": false,
"enabled": true,
"custom": true
}
]
}
]
}
~~~
</ResponseExample>
## Errors
<AccordionGroup>
<Accordion title="400 Bad Request" icon="circle-exclamation">
The agent ID or prompt version ID is not a valid UUID.
</Accordion>
<Accordion title="401 Unauthorized" icon="lock">
The API key is missing, malformed, revoked, or invalid.
</Accordion>
<Accordion title="403 Forbidden" icon="shield-halved">
The API key does not include the `read` scope required for this route.
</Accordion>
<Accordion title="404 Not Found" icon="ghost">
The agent ID does not exist.
</Accordion>
<Accordion title="406 Not Acceptable" icon="circle-question">
The agent belongs to a different workspace, or the prompt version does not belong to the agent in the path.
</Accordion>
<Accordion title="500 Internal Server Error" icon="triangle-exclamation">
Fini failed while loading the prompt version or workspace template.
</Accordion>
</AccordionGroup>
## Related topics
- [Get prompt history](/en/api-reference/get-prompt-history.md)
- [Overview](/en/api-reference/prompts.md)
- [Get prompt draft version](/en/api-reference/get-prompt-draft-version.md)
This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.
Prompts

