Skip to content
Dashboard

Add an answer to a knowledge base

POST
/knowledge-bases/{id}/answers
curl --request POST \
--url https://app.whatsetter.com/api/v1/knowledge-bases/example/answers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "question": "How much is the trial session?", "answer": "The trial session is free, with no commitment." }'

Adds a question/answer pair. The agents that answer from this base can use it on their next reply. question holds 1 to 1000 characters, answer 1 to 4000: a longer text is refused, never cut. A base holds up to 200 answers, and adding one needs a paid plan. Requires scope knowledge:write.

id
required
string
Media typeapplication/json
object
question
required
string
>= 1 characters <= 1000 characters
answer
required
string
>= 1 characters <= 4000 characters
Example
{
"question": "How much is the trial session?",
"answer": "The trial session is free, with no commitment."
}

The answer

Media typeapplication/json
object
data
object
id
string
question
string
answer
string
created_at
string | null format: date-time
updated_at
string | null format: date-time
Example
{
"data": {
"id": "68e3a90f0026d1e4b7a2",
"question": "How much is the trial session?",
"answer": "The trial session is free, with no commitment.",
"created_at": "2026-10-08T14:20:05.000+00:00",
"updated_at": "2026-10-08T14:20:05.000+00:00"
}
}

Missing, unknown or revoked API key

Media typeapplication/json
object
error
object
code
string
message
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

The plan does not add knowledge, or the base is full

Media typeapplication/json
object
error
object
code
string
message
string
Example
{
"error": {
"code": "plan_limit_reached",
"message": "Adding knowledge needs a paid plan. Existing answers can still be read, corrected and removed."
}
}

The key lacks the required scope (insufficient_scope), the plan does not have this part of the API (not_in_plan), or Instagram is not enabled on the workspace (instagram_not_enabled, Instagram routes)

Media typeapplication/json
object
error
object
code
string
message
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

Resource not found in this workspace

Media typeapplication/json
object
error
object
code
string
message
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

Missing, empty or too long question or answer

Media typeapplication/json
object
error
object
code
string
message
string
Example
{
"error": {
"code": "validation_error",
"message": "\"answer\" is required (1 to 4000 characters)."
}
}

The knowledge store did not accept the answer (nothing was saved)

Media typeapplication/json
object
error
object
code
string
message
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}