Skip to main content
Search Content
Performs vector-similarity search over project content (entities, comments, and chat messages) using AI embeddings. Returns the most semantically relevant results for the given query. Requires a paid plan with semantic search enabled. Authentication required. Send a user’s access token as Authorization: Bearer <token> — missing token → 401, invalid/expired token → 403 (refresh and retry). A service key is accepted too: with actingUserId it gets exactly what that user’s own token would get, and without it exactly the anonymous view — no chat messages, only content from spaces anyone can read, no block filtering under What’s left out, and no comment moderation details.

Body Parameters

string
required
The natural language search query.
string[]
default:"[\"entity\", \"comment\", \"message\"]"
Content types to search. Any combination of entity, comment, message.
string
Restrict search to a specific space. It narrows the search; it never widens what the user can read. Without includeChildSpaces, a space the user can’t read (see Spaces they can’t read), or one that doesn’t exist, gives an empty array, not an error.
boolean
default:"false"
Only applies with a spaceId. When true, the search also includes every space nested under it — children, grandchildren, the whole subtree at any depth — not just the named space. Only the spaces in the subtree the user can read are searched: a readable sub-space is searched even when the user can’t read the named space itself, whose own content is then left out. Ignored without a spaceId.
string
Restrict message search to a specific conversation.
string
Service key only: the user to search as. Results follow that user’s access — their chats, their blocks. Without it, a service key gets the anonymous view: entities and comments from spaces anyone can read, but no chat messages. A user token always acts as its own user and must not send it (400 search/acting-user-not-allowed).
number
default:"20"
Maximum number of results to return. A whole number from 1 to 50, sent as a JSON number. A value outside that range is rejected with 400 search/invalid-body — a limit above 50 isn’t lowered to 50.

Space-scoped reputation

This endpoint has a space in context, so it accepts the opt-in reputation params, in the body with the other fields (spaceReputationDescendants as a JSON boolean). They add a spaceReputation field to each result record’s populated user, alongside the always-present reputation total. Only spaces the viewer can read count: a space they can’t read reads 0 (see Who sees space reputation). Requires the reputation bundle. See the Reputation data model for the full contract.
Every field goes in the body. A body field sent in the query string returns 400 search/wrong-location.

Response

Returns an array of result objects ordered by similarity (highest first):
Each result includes:
  • sourceType — one of "entity", "comment", or "message", indicating which type of record was matched.
  • similarity — cosine similarity score between the query and the matched content.
  • record — the fully populated entity, comment, or chat message object. Entity records carry commentsCount. A record’s user is the author’s public User — no email or other private fields.

What’s left out

Spaces they can’t read

Entities and comments come only from spaces the user can read: they can see the space and either are an active member of it, or its readingPermission is "anyone" and they can read the space above it (see Who can read content). A comment counts as being in its entity’s space. Content in no space is always included. With no user (a service key without actingUserId), only spaces anyone can read count. The filter runs inside the similarity search, so a heavily filtered query can return fewer results than limit.

Deleted, removed and blocked content

Comments their author deleted are never returned. Comments a moderator removed are never returned either — to anyone, including the removed comment’s author and requests made with a service key. Chat messages come only from conversations the user can read in the chat itself: ones they’re an active member of, and, for a conversation they left or were removed or banned from, messages sent before they left. A space chat counts only while the user is an active member of its space and can see it, so a former member of the space gets none of its messages. conversationId narrows the search; it never widens what the user can read. Messages their author deleted or a moderator removed are never returned. A request with no user (a service key without actingUserId) gets no chat messages. Results are also filtered for the user — the signed-in user, or the actingUserId a service key sends (with the moderation bundle installed):
  • Content by users they are block-edged with, in either direction, is left out.
  • Comments on an entity whose author has blocked them are left out — their own comments there included.

Error Responses

The endpoint requires a user token or a service key. A missing token returns a bare 401; an invalid or expired token returns a bare 403 — refresh the access token and retry.
Returned when the body fails validation: query is missing or empty, limit isn’t a whole number from 1 to 50, sourceTypes contains a value other than entity, comment or message, spaceId, conversationId or actingUserId isn’t a UUID, or includeChildSpaces isn’t a boolean.
Returned when a body field — query, actingUserId, spaceReputationId, spaceReputationDescendants or any other — is sent in the query string.
Returned when a user token, or a request with no credentials, sends actingUserId, even naming its own user. Only a service key names the user it acts as; a user token always acts as its own user.
Returned when a service key names an actingUserId that isn’t a user in this project.