{"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":"Check source on a shared thread","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":"check-source-on-a-shared-thread","__idx":0},"children":["Check source on a shared thread"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The slug-scoped twin of ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/threads/check-source"},"children":["Check source of a highlighted span"]}," for a recipient who reaches the thread through a share link."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Traces the highlighted span against the thread's ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["own"]}," sources only — never organization knowledge stores attached to the chat (those are counted in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["redacted_count"]},") and never Space stores. Preview only: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["save: true"]}," is rejected with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["422"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The origin contract is the same as the owner route: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sources"]}," is never empty (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["knowledge"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["document"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["conversation"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["generated"]},"). ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["redacted_count"]}," reports hidden stores independently."]},{"$$mdtype":"Tag","name":"ApiContainer","attributes":{},"children":[{"$$mdtype":"Tag","name":"Endpoint","attributes":{"method":"POST","path":"https://api.aitronos.com/v1/shared-threads/{slug}/messages/{message_id}/check-source"},"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). The slug must resolve for the caller. An unknown or unauthorized link returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["404"]},", never ",{"$$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."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["message_id"]}]}," 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 assistant message (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["msg_"]}," prefix) the span was highlighted in."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"body-parameters","__idx":3},"children":["Body Parameters"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Same as ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/threads/check-source"},"children":["Check source of a highlighted span"]},". ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["save"]}," must be ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}," or omitted."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"returns","__idx":4},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Same ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CheckSourceResponse"]}," shape as the owner route. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["saved"]}," is always ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"code-examples","__idx":5},"children":["Code Examples"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"curl","__idx":6},"children":["cURL"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST https://api.aitronos.com/v1/shared-threads/sl_8f3c/messages/msg_1a2b/check-source \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"text\": \"onboarding starts on day one\"}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"python-sdk","__idx":7},"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=\"your-api-key\")\nresult = client.shared_threads.check_source(\n    slug=\"sl_8f3c\",\n    message_id=\"msg_1a2b\",\n    text=\"onboarding starts on day one\",\n)\nprint(result.sources[0].type)\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"python-requests","__idx":8},"children":["Python (requests)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\nresp = requests.post(\n    \"https://api.aitronos.com/v1/shared-threads/sl_8f3c/messages/msg_1a2b/check-source\",\n    headers={\"Authorization\": \"Bearer YOUR_TOKEN\"},\n    json={\"text\": \"onboarding starts on day one\"},\n)\nprint(resp.json())\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"javascript","__idx":9},"children":["JavaScript"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"const resp = await fetch(\n  \"https://api.aitronos.com/v1/shared-threads/sl_8f3c/messages/msg_1a2b/check-source\",\n  {\n    method: \"POST\",\n    headers: {\n      Authorization: \"Bearer YOUR_TOKEN\",\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({ text: \"onboarding starts on day one\" }),\n  },\n);\nconsole.log(await resp.json());\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"error-responses","__idx":10},"children":["Error Responses"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"VALIDATION_ERROR\",\n    \"message\": \"Saving an attribution is not available on a shared view — re-run without save, or open the thread as its owner.\",\n    \"type\": \"client_error\",\n    \"status\": 422,\n    \"details\": {\"slug_scoped\": true},\n    \"trace_id\": \"trc_example\",\n    \"timestamp\": \"2026-08-14T12:00:00Z\"\n  }\n}\n","lang":"json"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"related-resources","__idx":11},"children":["Related Resources"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/threads/check-source"},"children":["Check source of a highlighted span"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/shared-threads/shared-thread-sources"},"children":["Shared Thread Sources"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/shared-threads/get-shared-thread"},"children":["Get Shared Thread"]}]}]}]},"headings":[{"value":"Check source on a shared thread","id":"check-source-on-a-shared-thread","depth":1},{"value":"Authentication","id":"authentication","depth":2},{"value":"Path Parameters","id":"path-parameters","depth":2},{"value":"Body Parameters","id":"body-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":"Error Responses","id":"error-responses","depth":2},{"value":"Related Resources","id":"related-resources","depth":2}],"frontmatter":{"title":"Check source on a shared thread","seo":{"title":"Check source on a shared thread"}},"lastModified":"2026-10-26T18:32:31.653Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/api-reference/shared-threads/check-source","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}