Search Messages
const url = 'https://api.ultimateteam.ai/api/v1/team-chat/search?q=example&limit=20';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.ultimateteam.ai/api/v1/team-chat/search?q=example&limit=20' \ --header 'X-API-Key: <X-API-Key>'Search chat messages and thread titles by keyword.
Uses PostgreSQL full-text search with ranking and snippets.
Args: q: Search query string. limit: Maximum results to return. user: The authenticated user context. session: Async database session.
Returns: ChatSearchResponse with ranked results.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters”Search query
Search query
Max results
Max results
Responses
Section titled “ Responses ”Successful Response
Full-text search results across chat messages and threads.
Attributes: results: Ranked search results. total: Total number of results. query: The original search query.
object
A single search result from full-text message search.
Attributes: message_id: The matching message UUID. thread_id: The thread containing the message. thread_title: Human-readable thread title. sender_role: Who sent the message. content: Full message content. snippet: Highlighted snippet with tags. rank: Relevance score from ts_rank_cd. created_at: When the message was created.
object
Examplegenerated
{ "query": "example", "results": [ { "content": "example", "created_at": "2026-04-15T12:00:00Z", "message_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "rank": 1, "sender_role": "example", "snippet": "example", "thread_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "thread_title": "example" } ], "total": 1}Validation Error
object
object
object
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}