API reference / Tasks and projects
Attach a file
Attaches a file to a task: its bytes in content as base64, up to 25 MB (a body of at most 36 MB), and at most 20 files a task. Its teammates see every file's name and read the text of text files (txt, md, csv, tsv, json), PDFs and Word documents (.docx). Files are private: they download from their url with your key. From the CLI, pass --content @./brief.pdf to read a file.
/api/v1/tasks/{key}/attachmentsOther ways to call it
troopy tasks attachIdempotency-Key header. A retry with the same key gets the first answer back, and the operation runs one time.Path parameters
key*stringA task's key (VIR-12), its number (12) or its id
At least 1 characters · At most 40 characters
Body
application/jsonname*stringThe file's name, like brief.pdf
At least 1 characters · At most 200 characters
content*stringThe file, base64-encoded
At most 35000000 characters · base64
Response
201 · application/jsondata*object7 properties
id*stringA 24-character id
name*stringcontentType*stringAs Troopy serves it; a type a browser could run is served as plain bytes
size*integerIn bytes
by*objectWho wrote it
3 properties
type*enum<string>personagentapi
id*stringname*stringcreatedAt*stringISO 8601 date and time
url*stringDownloads it: send your API key, or be signed in