Tasks
Attach Files
Attach uploaded files to a task.
POST
Attach a new file in three steps:
- Call the file upload endpoint. It returns a
job_idand anupload_url. PUTthe file toupload_urlwith the sameContent-Type.- Call this endpoint with
{"upload_job_id": "<job_id>"}inattachments.
{"url": "https://..."} in attachments and Wordsmith downloads it. To attach a file that is already in Wordsmith, for example from another task’s input_files, pass its id in file_ids.
Returns the updated task. Each new file appears in input_files with its own file id, which differs from the job_id.
The task stores a copy of each file, so the file id in input_files differs from the one you passed in file_ids. The original file stays where it was, and the people who could open it still can. A file that is already on this task keeps its id.
A job_id expires after 1 hour and can be used once. A job used here cannot also be sent to an agent question, and the other way round. A rejected request uses up no job_id, so you can fix the request and retry.
Body parameters
Pass at least one file, infile_ids or attachments.
array
Ids of files already in Wordsmith. The task gets a copy of each one, with a new file
id. A job_id does not go here; use attachments.array
Up to 10 new files. Each entry has exactly one of:
upload_job_id: thejob_idfrom the file upload endpoint, once the file is uploaded.url: a public http(s) URL. It must return the file with status 200 within 20 seconds, and the file must be under 256 MB.