{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-docs/api-reference/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["api-container","endpoint"]},"redocly_category":"API Reference","searchWeight":120,"type":"markdown"},"seo":{"title":"Get Shared Thread Turns","description":"Complete API reference and documentation for Freddy AI-powered backend system by Aitronos","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"get-shared-thread-turns","__idx":0},"children":["Get Shared Thread Turns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Returns a lightweight manifest of ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["every user prompt"]}," in the thread behind a share link — id, a short preview, and a timestamp — for the whole thread, oldest to newest, independent of message-body pagination."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This is the slug-scoped equivalent of ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/threads/list-turns"},"children":["List thread turns"]},", which is ownership-scoped and returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["404"]}," for a share-link recipient. Each ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["message_id"]}," matches the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," returned by ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/shared-threads/get-shared-thread-messages"},"children":["Get Shared Thread Messages"]},", so a client can jump to any turn with that endpoint's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["around="]}," window fetch — including turns it has not paged in yet. Bodies are never included, so the response stays cheap on a long thread."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Authorization is the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["same"]}," as reading the thread's messages: the slug must resolve for you. Every access level (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["view"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fork"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["live"]},") may read it — a view-only visitor needs the turn rail as much as a joined participant."]},{"$$mdtype":"Tag","name":"ApiContainer","attributes":{},"children":[{"$$mdtype":"Tag","name":"Endpoint","attributes":{"method":"GET","path":"https://api.aitronos.com/v1/shared-threads/{slug}/turns"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"authentication","__idx":1},"children":["Authentication"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Requires ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["user"]}," authentication (Bearer token). An API key has no recipient identity and is rejected with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["403"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"path-parameters","__idx":2},"children":["Path Parameters"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["slug"]}]}," string ",{"$$mdtype":"Tag","name":"em","attributes":{"style":{"color":"#ef4444 !important","fontWeight":"600 !important","fontStyle":"normal !important"}},"children":["required"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The share-link slug, taken from the share URL."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"returns","__idx":3},"children":["Returns"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["turns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["array"]}," — every user-role prompt in the thread, oldest to newest. Each entry has:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["message_id"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}," — stable message id (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["msg_…"]},") of the prompt. Matches the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," from ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/shared-threads/get-shared-thread-messages"},"children":["Get Shared Thread Messages"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["preview"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}," — short (~80-character) excerpt of the prompt text."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["created_at"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}," — ISO-8601 UTC timestamp of the prompt."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["truncated"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["boolean"]}," — ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," only if the thread has more user turns than the server cap (2000). In that case the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["newest"]}," 2000 are returned (the recent end of the thread, where you navigate) and the oldest are dropped. Effectively always ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}," for real threads — a payload guard, not pagination."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Not paginated: there is no ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["limit"]},", cursor, or window. One call covers the whole thread."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"code-examples","__idx":4},"children":["Code Examples"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"curl","__idx":5},"children":["cURL"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X GET \"https://api.aitronos.com/v1/shared-threads/abc123slug/turns\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"python-sdk","__idx":6},"children":["Python SDK"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"from aitronos import Aitronos  # pip install aitronos-sdk\n\nclient = Aitronos(api_key=\"\", token=\"YOUR_TOKEN\")\n\nmanifest = client.threads.shared.list_turns(slug=\"abc123slug\")\nfor turn in manifest.turns:\n    print(turn.message_id, turn.preview)\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"python-requests","__idx":7},"children":["Python (requests)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\nresponse = requests.get(\n    \"https://api.aitronos.com/v1/shared-threads/abc123slug/turns\",\n    headers={\"Authorization\": \"Bearer YOUR_TOKEN\"},\n)\nprint(response.json()[\"turns\"])\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"javascript","__idx":8},"children":["JavaScript"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"const response = await fetch(\n  \"https://api.aitronos.com/v1/shared-threads/abc123slug/turns\",\n  { headers: { Authorization: \"Bearer YOUR_TOKEN\" } },\n);\nconst manifest = await response.json();\nconsole.log(manifest.turns.length);\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"response-examples","__idx":9},"children":["Response Examples"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"success-200","__idx":10},"children":["Success (200)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"turns\": [\n    {\n      \"message_id\": \"msg_bcb0ef5c53d04a70bf49203f0b43ac5c\",\n      \"preview\": \"First question I asked…\",\n      \"created_at\": \"2026-07-16T10:30:54.902122Z\"\n    },\n    {\n      \"message_id\": \"msg_638dee6512f14bafa75c6bc1fe10bd59\",\n      \"preview\": \"Follow-up about pricing\",\n      \"created_at\": \"2026-07-16T10:32:42.968571Z\"\n    }\n  ],\n  \"truncated\": false\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"error--unknown--unauthorized-link-404","__idx":11},"children":["Error — unknown / unauthorized link (404)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The same uniform deny as opening the link — it never reveals whether the link or thread exists."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"RESOURCE_NOT_FOUND\",\n    \"message\": \"That share link could not be found.\",\n    \"system_message\": \"Share link unresolved for user\",\n    \"type\": \"client_error\",\n    \"status\": 404,\n    \"details\": {},\n    \"trace_id\": \"...\",\n    \"timestamp\": \"...\"\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"related-resources","__idx":12},"children":["Related Resources"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/shared-threads/get-shared-thread-messages"},"children":["Get Shared Thread Messages"]}," — Jump to a turn with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["around={message_id}"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/shared-threads/search-shared-thread-messages"},"children":["Search Shared Thread Messages"]}," — Find a turn anywhere in the thread"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/shared-threads/shared-thread-read-state"},"children":["Shared Thread Read State"]}," — Restore where you stopped reading"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/shared-threads/get-shared-thread"},"children":["Get Shared Thread"]}," — Open the share link"]}]}]}]},"headings":[{"value":"Get Shared Thread Turns","id":"get-shared-thread-turns","depth":1},{"value":"Authentication","id":"authentication","depth":2},{"value":"Path Parameters","id":"path-parameters","depth":2},{"value":"Returns","id":"returns","depth":2},{"value":"Code Examples","id":"code-examples","depth":2},{"value":"cURL","id":"curl","depth":3},{"value":"Python SDK","id":"python-sdk","depth":3},{"value":"Python (requests)","id":"python-requests","depth":3},{"value":"JavaScript","id":"javascript","depth":3},{"value":"Response Examples","id":"response-examples","depth":2},{"value":"Success (200)","id":"success-200","depth":3},{"value":"Error — unknown / unauthorized link (404)","id":"error--unknown--unauthorized-link-404","depth":3},{"value":"Related Resources","id":"related-resources","depth":2}],"frontmatter":{"title":"Get Shared Thread Turns","seo":{"title":"Get Shared Thread Turns"}},"lastModified":"2026-10-26T18:32:31.653Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/api-reference/shared-threads/get-shared-thread-turns","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}