Full-text search over the message bodies of the thread behind a share link — including history the client has not paged in yet. Matching is case-insensitive substring over message content, newest matches first, paginated with an opaque cursor.
This is the slug-scoped equivalent of Search messages, which is ownership-scoped and returns 404 for a share-link recipient. Each hit carries the stable message id from Get Shared Thread Messages, so a client can jump to a hit with around={message_id} on that endpoint.
Authorization is the same as reading the thread's messages: the slug must resolve for you, at any access level. An unknown or unauthorized link returns 404 — never 403 — so a client can latch the capability off once instead of firing a denied request per keystroke.
Requires user authentication (Bearer token). An API key has no recipient identity and is rejected with 403.
slug string required
The share-link slug, taken from the share URL.
q string required
Full-text query over message body text within this thread. 1 to 500 characters. A blank query returns 422.
limit integer optional
Maximum results per page, between 1 and 50. Defaults to 20.
cursor string optional
Opaque continuation cursor from a previous response's next_cursor. A malformed cursor returns 422.
role string optional
Restrict results to messages with this role: user, assistant, system, or tool.
- object
string— alwayslist. - data
array— matching messages, newest first. Each hit has:- message_id
string— stable message id (msg_…), usable as thearoundanchor. - role
string—user,assistant,system, ortool. - snippet
string— short excerpt of the message body around the first match. Machine-facing skill directives appended by the composer are removed from the excerpt; they remain part of the stored message and are still matched byq. - created_at
string— ISO-8601 UTC timestamp of the message.
- message_id
- has_more
boolean— whether more results exist. - next_cursor
string | null— cursor for the next page;nullwhen exhausted. - coverage
object— honesty block stating what the search actually covered (indexed, plus anotewhen there is a caveat).
curl -X GET "https://api.aitronos.com/v1/shared-threads/abc123slug/messages/search?q=launch&limit=20" \
-H "Authorization: Bearer YOUR_TOKEN"from aitronos import Aitronos # pip install aitronos-sdk
client = Aitronos(api_key="", token="YOUR_TOKEN")
results = client.threads.shared.search_messages(slug="abc123slug", q="launch")
for hit in results.data:
print(hit.message_id, hit.snippet)import requests
response = requests.get(
"https://api.aitronos.com/v1/shared-threads/abc123slug/messages/search",
headers={"Authorization": "Bearer YOUR_TOKEN"},
params={"q": "launch", "limit": 20},
)
print(response.json()["data"])const response = await fetch(
"https://api.aitronos.com/v1/shared-threads/abc123slug/messages/search?q=launch",
{ headers: { Authorization: "Bearer YOUR_TOKEN" } },
);
const results = await response.json();
console.log(results.data);{
"object": "list",
"data": [
{
"message_id": "msg_7a6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d",
"role": "user",
"snippet": "…how should we sequence the launch?…",
"created_at": "2026-08-01T12:00:00Z"
}
],
"has_more": false,
"next_cursor": null,
"coverage": { "indexed": true, "note": null }
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "The request could not be validated.",
"system_message": "Search query must not be blank",
"type": "client_error",
"status": 422,
"details": { "q": " " },
"trace_id": "...",
"timestamp": "..."
}
}{
"success": false,
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "That share link could not be found.",
"system_message": "Share link unresolved for user",
"type": "client_error",
"status": 404,
"details": {},
"trace_id": "...",
"timestamp": "..."
}
}- Get Shared Thread Messages — Jump to a hit with
around={message_id} - Get Shared Thread Turns — Every turn in the thread, for the turn rail
- Shared Thread Sources — The files behind the conversation
- Get Shared Thread — Open the share link