{"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":"Send to 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":"send-to-shared-thread","__idx":0},"children":["Send to Shared Thread"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Posts a message to the live-shared conversation behind a share link, as the recipient who joined via this slug — the slug-scoped twin of ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/responses/create-response"},"children":["Create a Response"]}," for a participant who is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["not"]}," the owner (and may be in a different organization). It accepts the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["same"]}," request body and returns the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["same"]}," response: an ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events"},"children":["SSE"]}," event stream when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["stream"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]},", otherwise a single JSON response."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Allowed ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["only"]}," when the link's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["access_level"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["live"]}," (a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["view"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fork"]}," slug returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["403"]},"); an unknown or unauthorized link returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["404"]},". The posted message is attributed to the caller, and the turn runs under the shared thread's organization. Any ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["thread_id"]}," in the body is ignored — the slug determines the target thread."]},{"$$mdtype":"Tag","name":"ApiContainer","attributes":{},"children":[{"$$mdtype":"Tag","name":"Endpoint","attributes":{"method":"POST","path":"https://api.aitronos.com/v1/shared-threads/{slug}/response"},"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. Authenticate with a Bearer token or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["x-api-key"]}," header. Native ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EventSource"]}," clients that cannot set an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization"]}," header may pass the token via the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["token"]}," query param (streaming only)."]},{"$$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":"query-parameters","__idx":3},"children":["Query Parameters"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["token"]}]}," string ",{"$$mdtype":"Tag","name":"em","attributes":{"style":{"color":"#9ca3af !important","fontWeight":"500 !important","fontStyle":"normal !important"}},"children":["optional"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Access token for clients that cannot set an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization"]}," header (native ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EventSource"]},"). Ignored when a header credential is present."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"body-parameters","__idx":4},"children":["Body Parameters"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The body is identical to ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/responses/create-response"},"children":["Create a Response"]},". The most common fields:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["inputs"]}]}," array ",{"$$mdtype":"Tag","name":"em","attributes":{"style":{"color":"#ef4444 !important","fontWeight":"600 !important","fontStyle":"normal !important"}},"children":["required"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The conversation inputs for this turn — a list of message objects (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["role"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["content"]},")."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["stream"]}]}," boolean ",{"$$mdtype":"Tag","name":"em","attributes":{"style":{"color":"#9ca3af !important","fontWeight":"500 !important","fontStyle":"normal !important"}},"children":["optional"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]},", returns an SSE event stream; otherwise a single JSON response. Defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["thread_id"]}]}," string ",{"$$mdtype":"Tag","name":"em","attributes":{"style":{"color":"#9ca3af !important","fontWeight":"500 !important","fontStyle":"normal !important"}},"children":["optional"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ignored on this endpoint — the target thread is always the one the slug resolves to."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mention_mode"]}]}," string ",{"$$mdtype":"Tag","name":"em","attributes":{"style":{"color":"#9ca3af !important","fontWeight":"500 !important","fontStyle":"normal !important"}},"children":["optional"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Routes the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@"]},"-tags in this message; see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/responses/create-response"},"children":["Create a Response"]}," for the accepted IDs. Whether the assistant answers is decided by the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["slug's"]}," thread, not by the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["thread_id"]}," in the body, and that thread already exists — so this field never changes the thread's assistant participation here. A thread created in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["conversation"]}," mode stays a group chat: an untagged message posts without an assistant turn, and tagging an assistant pulls it in for that turn."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"returns","__idx":5},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["stream"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]},", a single JSON response describing the assistant's reply (same shape as ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/responses/create-response"},"children":["Create a Response"]},"). When ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["stream"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]},", a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["text/event-stream"]}," response carrying the same SSE event sequence as the owner send."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"code-examples","__idx":6},"children":["Code Examples"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"curl","__idx":7},"children":["cURL"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://api.aitronos.com/v1/shared-threads/abc123slug/response\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"inputs\": [{\"role\": \"user\", \"content\": \"Let'\\''s add a rollback step.\"}],\n    \"stream\": false\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"python-sdk","__idx":8},"children":["Python SDK"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"from aitronos import Aitronos\n\nclient = Aitronos(api_key=\"\", token=\"YOUR_TOKEN\")\nresult = client.threads.shared.respond(\n    slug=\"abc123slug\",\n    inputs=[{\"role\": \"user\", \"content\": \"Let's add a rollback step.\"}],\n    stream=False,\n)\nprint(result)\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"python-requests","__idx":9},"children":["Python (requests)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\nresponse = requests.post(\n    \"https://api.aitronos.com/v1/shared-threads/abc123slug/response\",\n    headers={\"Authorization\": \"Bearer YOUR_TOKEN\"},\n    json={\n        \"inputs\": [{\"role\": \"user\", \"content\": \"Let's add a rollback step.\"}],\n        \"stream\": False,\n    },\n)\nprint(response.json())\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"javascript","__idx":10},"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/response\",\n  {\n    method: \"POST\",\n    headers: {\n      Authorization: \"Bearer YOUR_TOKEN\",\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\n      inputs: [{ role: \"user\", content: \"Let's add a rollback step.\" }],\n      stream: false,\n    }),\n  },\n);\nconsole.log(await response.json());\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"response-examples","__idx":11},"children":["Response Examples"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"success-200--non-streaming","__idx":12},"children":["Success (200) — non-streaming"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"success\": true,\n  \"thread_id\": \"thread_5f8c2a1b9d4e4c3f8a7b6c5d4e3f2a1b\",\n  \"response\": [{\"type\": \"text\", \"text\": \"Added a rollback step before the deploy.\"}],\n  \"response_id\": \"resp_8a7b6c5d\",\n  \"stop_reason\": \"end_turn\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"error--link-does-not-grant-live-access-403","__idx":13},"children":["Error — Link does not grant live access (403)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"INSUFFICIENT_PERMISSIONS\",\n    \"message\": \"This share link does not grant live co-working access\",\n    \"system_message\": \"Insufficient permissions\",\n    \"type\": \"authorization_error\",\n    \"status\": 403,\n    \"details\": {\n      \"link_id\": \"slink_2b1c3d4e5f6a7b8c9d0e1f2a3b4c5d6e\",\n      \"access_level\": \"view\"\n    },\n    \"trace_id\": \"...\",\n    \"timestamp\": \"...\"\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"error--link-not-found-or-not-authorized-404","__idx":14},"children":["Error — Link not found or not authorized (404)"]},{"$$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":15},"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/join-shared-thread"},"children":["Join Shared Thread"]}," — Join a live-shared thread first"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/shared-threads/live-shared-thread"},"children":["Live Shared Thread"]}," — Subscribe to the co-working event stream"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/shared-threads/reconnect-shared-thread-stream"},"children":["Reconnect to Shared Thread Stream"]}," — Resume an in-flight response"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/shared-threads/cancel-shared-thread-response"},"children":["Cancel Shared Thread Response"]}," — Cancel your in-flight response"]}]}]}]},"headings":[{"value":"Send to Shared Thread","id":"send-to-shared-thread","depth":1},{"value":"Authentication","id":"authentication","depth":2},{"value":"Path Parameters","id":"path-parameters","depth":2},{"value":"Query Parameters","id":"query-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":"Response Examples","id":"response-examples","depth":2},{"value":"Success (200) — non-streaming","id":"success-200--non-streaming","depth":3},{"value":"Error — Link does not grant live access (403)","id":"error--link-does-not-grant-live-access-403","depth":3},{"value":"Error — Link not found or not authorized (404)","id":"error--link-not-found-or-not-authorized-404","depth":3},{"value":"Related Resources","id":"related-resources","depth":2}],"frontmatter":{"title":"Send to Shared Thread","seo":{"title":"Send to Shared Thread"}},"lastModified":"2026-10-26T18:32:31.653Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/api-reference/shared-threads/send-shared-thread","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}