Skip to main content
POST
Attach a new file in three steps:
  1. Call the file upload endpoint. It returns a job_id and an upload_url.
  2. PUT the file to upload_url with the same Content-Type.
  3. Call this endpoint with {"upload_job_id": "<job_id>"} in attachments.
A file at a public URL needs no upload: pass {"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, in file_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: the job_id from 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.