FAQs
Add curated Q&A pairs so your agent gives consistent answers to important questions
Curated FAQs are manually defined question-and-answer pairs for high-stakes or policy-critical topics — pricing, compliance, eligibility, return policies, or anything where you need the agent to give a specific, controlled answer rather than generating one.
How it works
FAQs are organized into FAQ collections. Each collection contains Q&A pairs. When a user asks a question that matches one of your FAQs, the agent responds with the answer you defined rather than generating one.
Create an FAQ collection
You can create a collection and populate it with Q&A pairs in a single call:
curl -X POST https://companion-api.napster.com/public/faqs \
-H "X-Api-Key: $NAPSTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Return Policy",
"faqs": [
{
"question": "What is your return policy?",
"answer": "You can return any item within 30 days of purchase for a full refund. Items must be in original condition with tags attached."
},
{
"question": "How long do refunds take?",
"answer": "Refunds are processed within 5-7 business days after we receive the returned item."
}
]
}'Response:
{
"id": "faq_abc123",
"name": "Return Policy",
"created": 1710000000,
"items": [
{
"id": "faq_item_001",
"question": "What is your return policy?",
"answer": "You can return any item within 30 days of purchase for a full refund. Items must be in original condition with tags attached.",
"createdAt": 1710000000,
"updatedAt": null
},
{
"id": "faq_item_002",
"question": "How long do refunds take?",
"answer": "Refunds are processed within 5-7 business days after we receive the returned item.",
"createdAt": 1710000000,
"updatedAt": null
}
]
}The faqs array is optional — you can create an empty collection and add pairs later.
Attaching FAQs to an agent
After creating a collection, attach it to your agent when creating a connection. Pass the collection ID in the faqCollections array:
curl -X POST https://companion-api.napster.com/public/connections \
-H "X-Api-Key: $NAPSTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"companionId": "comp_abc123",
"faqCollections": ["faq_abc123"],
"providerConfig": {
"voiceId": "alloy",
"settings": {}
}
}'You can attach multiple FAQ collections to a single session by passing multiple IDs in the array.
Other operations
Use the API reference for managing collections and Q&A pairs after creation: