Set a prompt's FAQ answer
set_prompt_answerSet the FAQ answer of one tracked prompt (the same answer the dashboard's FAQ editor saves and the site's FAQPage JSON-LD carries). The answer is stored as sent, except that CRLF/CR line endings become LF and the ends are trimmed; an empty answer clears it. More than 600 characters (Unicode code points) is refused — { ok: false, reason: "invalid", field: "answer", max: 600 } — and never cut. source is your own label for the write (≤100 characters, e.g. a release tag), kept in the answer's change history. expectedHash (optional) is the answerHash you last read, or null for "no answer": when the stored answer's hash differs, nothing is saved and the result is { ok: false, reason: "conflict", currentHash } — so a stale copy cannot overwrite a newer answer; without expectedHash the write replaces whatever is stored. Returns { ok: true, queryId, answerHash, updatedAt, changed }: answerHash is the lowercase hex SHA-256 of the stored answer's UTF-8 bytes (null when cleared); sending the text already stored returns the same answerHash with changed: false and records nothing. queryId comes from list_prompts; an unknown or archived prompt is refused with reason unknown-query. Many answers at once is sync_prompt_answers.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| answer | Yes | The FAQ answer (≤600 characters); an empty string clears it. | |
| siteId | No | Optional on a connected app: the site chosen with select_site is used. If given, it must be that site. With an API key it is required: a site id from list_sites. | |
| source | No | Optional label for this write (≤100 characters), e.g. "ci:release-4.2". | |
| queryId | Yes | A tracked prompt's queryId, from list_prompts. | |
| expectedHash | No | Optional: the answerHash you last read (null = you expect no answer). If the stored answer differs, nothing is saved (reason conflict). |