Initiate Attachment Upload
Initiates (or deduplicates) an upload of a file attached to a session. If the exact content is already stored for this (session ID, file path), the response has alreadyExists: true and no upload is needed. Otherwise, PUT the file bytes to the returned uploadUrl, then call the commit endpoint. Re-initiating an existing (session ID, file path) with new content updates the attachment in place on commit.
post/attachments
Request body
Example request
{
"sessionId": "c59e5bd0-e5eb-4bf0-a08a-01f7e8f712c7",
"filePath": "/tmp/report.pdf",
"sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"sizeBytes": 482133,
"contentType": "application/pdf",
"filename": "report.pdf"
}Response
Upload initiated (or content already stored). If alreadyExists is false, PUT the bytes to uploadUrl and then commit.
Example response
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}