Read a library template
GET /v1/prompt-library/{slug}
Property Value Operation get_prompt_library_templateGroup Prompt templates Scope prompts:readRoute class readIdempotency No Idempotency-Key Audit Not audited: A configuration read of platform rows; they carry no Call content. Released in 1.55.0 Phase 0 host Served (the hosted api pins 1.65.0)
Request
Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the prompts:read scope (Authentication and keys ). Replace each placeholder, such as agt_... or <name>, with your own value.
cURL Node.js Python
curl "$VOCAL_API/v1/prompt-library/healthcare-appointment-confirmation" \
-H "Authorization: Bearer $VOCAL_API_KEY"const response = await fetch(`${process.env.VOCAL_API}/v1/prompt-library/healthcare-appointment-confirmation`, {
headers: {
Authorization: `Bearer ${process.env.VOCAL_API_KEY}`,
},
});
console.log(response.status, await response.text());import os
import requests
response = requests.get(
f"{os.environ['VOCAL_API']}/v1/prompt-library/healthcare-appointment-confirmation",
headers={
"Authorization": f"Bearer {os.environ['VOCAL_API_KEY']}",
},
)
print(response.status_code, response.text)
Parameters
Name In Type Required Description slugpath PromptLibrarySlug yes The name of a library template (1.55.0): kebab-case, 1 to 64 characters, stable across its versions.
Responses
Fields of the 200 answer
The shape is PromptLibraryTemplate .
Field Type Required Description allow_termsarray of PromptAllowTerm yes Staff and place names that phi_literal does not report (1.55.0), at most 100 of at most 100 characters. changelogarray of PromptLibraryChange yes Newest first. declarationsPromptDeclarations yes descriptionstring yes layerPromptLayer yes namestring yes A display name. object"prompt_library_template"yes packsarray of PromptLibraryPack yes The body in each language pack, en first. purposePromptPurpose yes recommended_policiesarray of PolicyDraft yes The Policy drafts that enforce what the template only asks, in JDM form, to create with POST /v1/policies ; a fork does not create them. segmentPromptSegment yes slugPromptLibrarySlug yes updated_atTimestamp yes versioninteger yes The version a fork now copies.