Skip to content
Settings and API

The Answer API

One endpoint answers a question from your knowledge base, with the same retrieval, citations and cost controls as the help center and widget.

4 min readGrowth and Scale plansUpdated 18 Oct 2026

The request

curl https://pagetruth.com/api/v1/answer \
  -H "Authorization: Bearer sk_…" \
  -H "Content-Type: application/json" \
  -d '{"question":"How do I reset my password?"}'
Field Required What it is
question yes Up to 1,000 characters
conversation_id no From a previous response, to ask a follow-up
user_id no Your own identifier for the person asking, up to 64 characters

The response

{
  "answer": "Choose Forgot password on the sign-in page… [1]",
  "answered": true,
  "cached": false,
  "conversation_id": "6f1c…",
  "citations": [
    {
      "index": 1,
      "document_id": "a2b9…",
      "title": "Account security",
      "page": 3,
      "quote": "Choose Forgot password and we email you a code.",
      "url": "https://pagetruth.com/help/acme/articles/account-security"
    }
  ],
  "escalation": null
}
  • answered is false when your docs don't cover the question. answer then holds your fallback message and escalation your hand-off button, if you set one.
  • cached is true when the answer came from cache, which doesn't count towards your answers.
  • url links to the cited article, or to the file at its page when customers may open source files; otherwise it's null.

Follow-up questions

Send the conversation_id you got back to continue the same conversation. The answer takes the last six turns into account.

Errors

Status Meaning
400 The body isn't valid, for example a missing or too long question
401 The key is missing, wrong or revoked
403 Your plan doesn't include the API
429 Too many requests: the response's retry-after header says when to try again
502 The answer couldn't be produced right now; try again

Each key can make 60 requests a minute.

Counting

Every answered question uses one AI answer from your plan, like any other channel. API conversations appear on Conversations under the channel API.

Was this helpful?