Download Thread file content
Downloads bytes for a ready Thread attachment or Agent artifact. The file must belong to a public Thread visible to the API token caller.
/files/{fileId}/contentDownloads bytes for a ready Thread attachment or Agent artifact. The file must belong to a public Thread visible to the API token caller.
Authorization
publicApiBearer Use Authorization: Bearer msp_... . Project API keys can configure Agents, execute Sessions, and access files only in their Project. Key and account management require console or CLI login. Legacy account tokens are rejected.
In: header
Path Parameters
File ID returned by add or list Thread files. v1 IDs are bare ULIDs.
^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ulidQuery Parameters
Controls the Content-Disposition response header. Use attachment for downloads or inline for previewable content.
"attachment"Value in
- "attachment"
- "inline"
Response Body
application/octet-stream
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/files/01J0000000000000000000000J/content?disposition=attachment""string"{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}