{"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":"Shared Thread Sources","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":"shared-thread-sources","__idx":0},"children":["Shared Thread Sources"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Lists the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["files that back the conversation"]}," behind a share link, and returns one of them by id. This is what the Knowledge & Sources panel reads on a shared chat view."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["These are the slug-scoped equivalents of the ownership-scoped thread sources routes, which return ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["404"]}," for a share-link recipient. Authorization is the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["same"]}," as reading the thread's messages: the slug must resolve for you, at any access level (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["view"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fork"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["live"]},")."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Both routes are ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["read-only"]},". Adding or removing a source stays owner/edit-scoped — a link holder can see what the conversation was grounded on, never change it."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["One deliberate difference from the owner routes:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["attached_vector_store_ids"]}," is always empty here. Those are organization knowledge stores merely attached to the thread as extra read sources; a link holder is authorized by possession of a URL, not by membership of those stores, so their ids are withheld — the same reason ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/shared-threads/get-shared-thread"},"children":["Get Shared Thread"]}," withholds the thread's space ids. The thread's ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["own"]}," source files are conversation content the link already grants."]},{"$$mdtype":"Tag","name":"ApiContainer","attributes":{},"children":[{"$$mdtype":"Tag","name":"Endpoint","attributes":{"method":"GET","path":"https://api.aitronos.com/v1/shared-threads/{slug}/sources"},"children":[]},{"$$mdtype":"Tag","name":"Endpoint","attributes":{"method":"GET","path":"https://api.aitronos.com/v1/shared-threads/{slug}/sources/{file_id}"},"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":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["file_id"]}]}," string ",{"$$mdtype":"Tag","name":"em","attributes":{"style":{"color":"#ef4444 !important","fontWeight":"600 !important","fontStyle":"normal !important"}},"children":["required"]}," (detail route only)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The source file's id (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["file_…"]},"), taken from an entry of the list route. A file that is not a source of this thread returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["404"]}," — the same status an unknown link returns."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"returns","__idx":3},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The list route returns the thread's source inventory:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["thread_id"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}," — the thread behind the link."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["source_vector_store_id"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string | null"]}," — the thread's own per-thread source store id (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tvs_…"]},"), or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]}," until the thread has any source."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["attached_vector_store_ids"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["array"]}," — ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["always empty"]}," on this route (see above)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["sources"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["array"]}," — the thread's own source files. Each entry has:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["file_id"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}," — file id (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["file_…"]},")."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["name"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string | null"]}," — display name."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["mime_type"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string | null"]}," — MIME type."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["size"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["integer"]}," — size in bytes."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["processing_status"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}," — ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pending"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["processing"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["completed"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["failed"]},". Only ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["completed"]}," sources are searchable."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["chunk_count"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["integer"]}," — number of searchable chunks produced."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["source_kind"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}," — how it was added: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["file"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["text_paste"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["url_capture"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["deep_research"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["added_at"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string | null"]}," — ISO-8601 timestamp it was added to the thread."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["added_by"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string | null"]}," — the person who added it; ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]}," for a machine-added source."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["origin_url"]}," / ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["research_session_id"]}," / ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["source_type"]}," — provenance for captured and researched sources."]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The detail route returns ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["one"]}," of those ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sources"]}," entries, unwrapped — the same object shape. It is metadata only: no file bytes and no download URL are served to a link holder. Use it to refresh a single row (for example to poll a source whose ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["processing_status"]}," is still ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pending"]},") without re-reading the whole panel."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The assistant's internal per-thread memory is never returned by either route."]},{"$$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":"# The whole panel\ncurl -X GET \"https://api.aitronos.com/v1/shared-threads/abc123slug/sources\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\"\n\n# One row\ncurl -X GET \"https://api.aitronos.com/v1/shared-threads/abc123slug/sources/file_abc123\" \\\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\npanel = client.threads.shared.list_sources(slug=\"abc123slug\")\nfor source in panel.sources:\n    print(source.file_id, source.name, source.processing_status)\n\none = client.threads.shared.get_source(slug=\"abc123slug\", file_id=\"file_abc123\")\nprint(one.processing_status)\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/sources\",\n    headers={\"Authorization\": \"Bearer YOUR_TOKEN\"},\n)\nprint(response.json()[\"sources\"])\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 panel = await (\n  await fetch(\n    \"https://api.aitronos.com/v1/shared-threads/abc123slug/sources\",\n    { headers: { Authorization: \"Bearer YOUR_TOKEN\" } },\n  )\n).json();\nconsole.log(panel.sources);\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--list-200","__idx":10},"children":["Success — list (200)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"thread_id\": \"thread_5f8c2a1b9d4e4c3f8a7b6c5d4e3f2a1b\",\n  \"source_vector_store_id\": \"tvs_9d4e4c3f8a7b6c5d\",\n  \"attached_vector_store_ids\": [],\n  \"sources\": [\n    {\n      \"file_id\": \"file_abc123\",\n      \"name\": \"launch-brief.pdf\",\n      \"mime_type\": \"application/pdf\",\n      \"size\": 184320,\n      \"processing_status\": \"completed\",\n      \"chunk_count\": 42,\n      \"source_kind\": \"file\",\n      \"added_at\": \"2026-08-01T12:00:00Z\",\n      \"added_by\": \"usr_4e3f2a1b9d4e4c3f\",\n      \"source_type\": \"web\"\n    }\n  ]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"success--one-source-200","__idx":11},"children":["Success — one source (200)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"file_id\": \"file_abc123\",\n  \"name\": \"launch-brief.pdf\",\n  \"mime_type\": \"application/pdf\",\n  \"size\": 184320,\n  \"processing_status\": \"completed\",\n  \"chunk_count\": 42,\n  \"source_kind\": \"file\",\n  \"added_at\": \"2026-08-01T12:00:00Z\",\n  \"added_by\": \"usr_4e3f2a1b9d4e4c3f\",\n  \"source_type\": \"web\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"success--no-sources-yet-200","__idx":12},"children":["Success — no sources yet (200)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A thread nobody has attached anything to. A normal state, not an error."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"thread_id\": \"thread_5f8c2a1b9d4e4c3f8a7b6c5d4e3f2a1b\",\n  \"source_vector_store_id\": null,\n  \"attached_vector_store_ids\": [],\n  \"sources\": []\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"error--not-a-source-of-this-thread-or-unknown--unauthorized-link-404","__idx":13},"children":["Error — not a source of this thread, or unknown / unauthorized link (404)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Deliberately the same status for both, so a probe cannot tell them apart."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"FILE_NOT_FOUND\",\n    \"message\": \"The requested file could not be found.\",\n    \"system_message\": \"Source not found on this thread\",\n    \"type\": \"client_error\",\n    \"status\": 404,\n    \"details\": { \"thread_id\": \"thread_5f8c2a1b…\", \"file_id\": \"file_ghost\" },\n    \"trace_id\": \"...\",\n    \"timestamp\": \"...\"\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"related-resources","__idx":14},"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/check-source"},"children":["Check source on a shared thread"]}," — Trace a highlighted span to its origin"]},{"$$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"]}," — The transcript these sources ground"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/shared-threads/get-shared-thread-turns"},"children":["Get Shared Thread Turns"]}," — Every turn in the thread, for the turn rail"]},{"$$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/get-shared-thread"},"children":["Get Shared Thread"]}," — Open the share link"]}]}]}]},"headings":[{"value":"Shared Thread Sources","id":"shared-thread-sources","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 — list (200)","id":"success--list-200","depth":3},{"value":"Success — one source (200)","id":"success--one-source-200","depth":3},{"value":"Success — no sources yet (200)","id":"success--no-sources-yet-200","depth":3},{"value":"Error — not a source of this thread, or unknown / unauthorized link (404)","id":"error--not-a-source-of-this-thread-or-unknown--unauthorized-link-404","depth":3},{"value":"Related Resources","id":"related-resources","depth":2}],"frontmatter":{"title":"Shared Thread Sources","seo":{"title":"Shared Thread Sources"}},"lastModified":"2026-10-26T18:32:31.654Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/api-reference/shared-threads/shared-thread-sources","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}