Report a Docs Gap
A doc-site reader reports that the docs don't cover a question they asked the assistant.
Records that the docs don't answer a question a reader asked the assistant. On doc engine v2 sites with agent mode, this is the Report a docs gap button on an answer the docs had nothing for. See Report a gap.
The question is read from the reader's own conversation on the server, never from the request body, so a report can only name something that was really asked. It is added to the project's documentation gaps with source: "reported".
Public (no API key required) and scoped to the project and the visitorId: a reader can only report from their own conversation.
On your doc site this endpoint is also served same-origin at POST /_chat/gaps. The project comes from the site's hostname, so the path takes no projectId.
Path Parameters
projectIdRequest Body
visitorIdsessionIdX-Session-Id from Ask the AI Assistant.messageIdX-Message-Id, or id on the message event). The reported question is the reader's last question at or before that answer. Without it, the conversation's latest question is reported.How a report is recorded
frequency: 1 and source: "reported".frequency goes up by one, the question joins its sample questions (up to five), and its source becomes "reported".200 and change nothing.Response — 201 Created
201 when the report was recorded; 200 with the same body when this question was already reported from this conversation.
Rate Limits
| Per | Limit |
|---|---|
| Visitor | 5 reports an hour |
| Client IP | 20 reports an hour — only for requests through your doc site |
| Project | 200 reports an hour |
A request is only counted once the conversation is found to be the visitor's, so a request for someone else's conversation never uses up the allowance. Over a limit, the response is 429 with a Retry-After header — see Agent mode action limits.
Error Responses
| Status | Code | When |
|---|---|---|
| 400 | validation_error | visitorId or sessionId missing or malformed, or messageId not a UUID |
| 403 | FORBIDDEN | The site is private (password, invite-only or SSO) and the request didn't come through the doc site ("Ask from the docs site") |
| 404 | NOT_FOUND | The project doesn't exist, or the conversation (or the answer messageId names) isn't this visitor's in this project, or has no question |
| 429 | RATE_LIMITED | A limit above was reached. retryAfterSeconds says when to try again |
| 500 | internal_error | The report could not be saved |
Related
?source=reported