curl --request DELETE \
--url 'https://api-prod.usefini.com/v2/bots/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/hc-prompt/versions/9c59b2df-5d5f-4c9e-a070-9ac3c2b1b24e/public' \
--header 'Authorization: Bearer fini_your_api_key'
import requests
agent_id = "4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3"
version_id = "9c59b2df-5d5f-4c9e-a070-9ac3c2b1b24e"
response = requests.delete(
f"https://api-prod.usefini.com/v2/bots/{agent_id}/hc-prompt/versions/{version_id}/public",
headers={"Authorization": "Bearer fini_your_api_key"},
)
response.raise_for_status()
const agentId = "4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3";
const versionId = "9c59b2df-5d5f-4c9e-a070-9ac3c2b1b24e";
const response = await fetch(
`https://api-prod.usefini.com/v2/bots/${agentId}/hc-prompt/versions/${versionId}/public`,
{
method: "DELETE",
headers: {
Authorization: "Bearer fini_your_api_key",
},
}
);
if (!response.ok) {
throw new Error(`Delete failed: ${response.status}`);
}
Prompts
Delete prompt draft version
Delete one unpublished prompt draft version.
DELETE
/
v2
/
bots
/
{id}
/
hc-prompt
/
versions
/
{versionId}
/
public
curl --request DELETE \
--url 'https://api-prod.usefini.com/v2/bots/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/hc-prompt/versions/9c59b2df-5d5f-4c9e-a070-9ac3c2b1b24e/public' \
--header 'Authorization: Bearer fini_your_api_key'
import requests
agent_id = "4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3"
version_id = "9c59b2df-5d5f-4c9e-a070-9ac3c2b1b24e"
response = requests.delete(
f"https://api-prod.usefini.com/v2/bots/{agent_id}/hc-prompt/versions/{version_id}/public",
headers={"Authorization": "Bearer fini_your_api_key"},
)
response.raise_for_status()
const agentId = "4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3";
const versionId = "9c59b2df-5d5f-4c9e-a070-9ac3c2b1b24e";
const response = await fetch(
`https://api-prod.usefini.com/v2/bots/${agentId}/hc-prompt/versions/${versionId}/public`,
{
method: "DELETE",
headers: {
Authorization: "Bearer fini_your_api_key",
},
}
);
if (!response.ok) {
throw new Error(`Delete failed: ${response.status}`);
}
Deletes one prompt draft version for an agent. The route only deletes versions
with
status: "DRAFT"; published prompt versions and archived versions are not
deleted by this endpoint.
Use this route to discard a staged prompt change that should not be reviewed or
published.
Deleting a draft removes it from normal prompt history reads. It does not change
the agent’s active prompt configuration.
Headers
string
required
Bearer token containing your Fini workspace API key. Format:
Bearer fini_...
The key needs write scope.Path parameters
string
required
Agent ID that owns the draft.
string
required
Exact draft version ID to delete.
Response
Returns204 No Content when the delete succeeds. The response body is empty.
curl --request DELETE \
--url 'https://api-prod.usefini.com/v2/bots/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/hc-prompt/versions/9c59b2df-5d5f-4c9e-a070-9ac3c2b1b24e/public' \
--header 'Authorization: Bearer fini_your_api_key'
import requests
agent_id = "4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3"
version_id = "9c59b2df-5d5f-4c9e-a070-9ac3c2b1b24e"
response = requests.delete(
f"https://api-prod.usefini.com/v2/bots/{agent_id}/hc-prompt/versions/{version_id}/public",
headers={"Authorization": "Bearer fini_your_api_key"},
)
response.raise_for_status()
const agentId = "4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3";
const versionId = "9c59b2df-5d5f-4c9e-a070-9ac3c2b1b24e";
const response = await fetch(
`https://api-prod.usefini.com/v2/bots/${agentId}/hc-prompt/versions/${versionId}/public`,
{
method: "DELETE",
headers: {
Authorization: "Bearer fini_your_api_key",
},
}
);
if (!response.ok) {
throw new Error(`Delete failed: ${response.status}`);
}
Errors
401 Unauthorized
401 Unauthorized
The API key is missing, malformed, revoked, or invalid.
403 Forbidden
403 Forbidden
The API key does not include
write scope.404 Not Found
404 Not Found
The version does not exist for this agent or is not a draft.
406 Not Acceptable
406 Not Acceptable
The agent belongs to a different workspace.
Was this page helpful?

