POST/ai/answers

Search pages and stream AI-generated answers

Searches page titles and content for relevant results and streams AI-generated answers. Supply query and optionally use spaceId or creatorId to narrow the search; the stream uses server-sent events.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

5 body fields

Search query and optional filters for the AI-powered search.

creatorIdstringoptional
Filter results to pages created by a specific user.
limitintegeroptional
Maximum number of results to return.
offsetintegeroptional
Number of results to skip for pagination.
querystringrequired
Full-text search query. Searches page titles and content.
spaceIdstringoptional
Restrict search results to a specific space. If omitted, searches across all spaces the user has access to.

3 status codes
200Returns a server-sent event stream containing the AI-powered search response.
400Returned when AI is not configured.
errorstringoptional
Reason phrase, for example `Bad Request`.
messagestringoptional
statusCodeintegeroptional
403Returned when the authenticated user is forbidden from using AI-powered search.
errorstringoptional
Reason phrase, for example `Bad Request`.
messagestringoptional
statusCodeintegeroptional

Error handling

A 400 is returned when AI is not configured. A 403 is returned when the authenticated user is not permitted to use this operation. query is required; spaceId and creatorId can optionally restrict the results.