Create a Q&A entry
Creates or updates question variants and an answer. Optional externalId is a stable, caller-owned key, unique within workspace Q&A. Otherwise a normalized question addresses an existing entry. POST appends variants (maximum 50) and replaces supplied content; PATCH replaces the question list. Questions cannot belong to multiple entries: ambiguous ownership returns 409 question_already_used. New entries return 201; updates and no-ops return 200. Responses include externalId, revision, and indexStatus. Indexing is attempted before returning; verify indexStatus rather than assuming HTTP success means searchable.
Writes omit semantic checks by default. Optional onMatch runs a bounded check against the addressed entry and retrieved knowledge: reject refuses overlap; update explicitly permits answer replacement, including contradictions, but refuses unclear results; create explicitly overrides the check. Without an addressed entry, update can merge a matching Q&A, subject to source ownership. Articles and files are never edited. Check failures return 503 before writing. This is not a transaction over the knowledge base: other entries can change concurrently. After a separate oracle call, use PATCH with the checked expectedRevision; stale writes return 409 revision_conflict.
Body ParametersJSON
Question variants this answer applies to (1–50). Phrase them the way customers ask.
Your own identifier for this entry (unique per workspace). When provided, the request creates the entry if the ID is new and otherwise updates the existing entry in place — an unchanged payload is a no-op. Use it to keep the AI agent in sync with a system of record without tracking Featurebase IDs.
Create a Q&A entry
curl https://do.featurebase.app/v2/training_data/qna \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $FEATUREBASE_API_KEY" \
-d '{
"answer": "You can request a refund within 30 days from **Settings → Billing**.",
"questions": [
"How do I request a refund?",
"Can I get my money back?"
],
"answerFormat": "markdown",
"externalId": "kb-article-1842",
"onMatch": "reject",
"source": "resolved-conversations",
"title": "Refund requests"
}'{
"id": "67ec1234abcd5678ef901235",
"answer": "You can request a refund within 30 days from **Settings → Billing**.",
"createdAt": "2026-09-03T10:15:00.000Z",
"externalId": "resolution-1842",
"indexStatus": "indexed",
"object": "qna",
"questions": [
"How do I request a refund?",
"Can I get my money back?"
],
"revision": 1,
"source": "resolved-conversations",
"title": "Refund requests",
"updatedAt": "2026-09-03T10:15:30.000Z",
"match": {
"entry": {
"id": "67ec1234abcd5678ef901236",
"kind": "qna",
"section": null,
"similarity": 0.61,
"title": "Refund requests",
"url": null
},
"reason": "Both answer how to request a refund; the new entry adds the 30-day window.",
"verdict": "same_topic"
},
"outcome": "created"
}Returns Examples
{
"id": "67ec1234abcd5678ef901235",
"answer": "You can request a refund within 30 days from **Settings → Billing**.",
"createdAt": "2026-09-03T10:15:00.000Z",
"externalId": "resolution-1842",
"indexStatus": "indexed",
"object": "qna",
"questions": [
"How do I request a refund?",
"Can I get my money back?"
],
"revision": 1,
"source": "resolved-conversations",
"title": "Refund requests",
"updatedAt": "2026-09-03T10:15:30.000Z",
"match": {
"entry": {
"id": "67ec1234abcd5678ef901236",
"kind": "qna",
"section": null,
"similarity": 0.61,
"title": "Refund requests",
"url": null
},
"reason": "Both answer how to request a refund; the new entry adds the 30-day window.",
"verdict": "same_topic"
},
"outcome": "created"
}