Generate File Upload URL
API Documentation
Generate File Upload URL
Generate a presigned URL for uploading files to use with an agent or a task
POST
Generate File Upload URL
Generates a presigned URL that can be used to upload files directly to Wordsmith’s storage. This is the first step when you want to include file attachments with agent questions, or attach files to a task.
Authentication
This endpoint requires a valid API key in the Authorization header.Request Body
string
required
The name of the file to be uploaded, including the file extension
string
required
The MIME type of the file (e.g., “application/pdf”, “text/plain”,
“application/vnd.openxmlformats-officedocument.wordprocessingml.document”,
“image/png”, “audio/mp3”)
Supported File Types
Wordsmith supports a wide variety of file formats including:- Documents: PDF, DOC, DOCX, TXT, MD, HTML
- Spreadsheets: XLS, XLSX, CSV, TSV
- Presentations: PPT, PPTX
- Images: PNG, JPEG, WebP, TIFF, HEIC, HEIF
- Audio: MP3, MP4, M4A, MPEG, WAV, WebM
- Archives: ZIP
Response
string
The presigned URL where you can upload your file using a PUT request.
string
The unique identifier for this upload job. After you upload the file, pass it as
upload_job_id
in an agent question’s attachments, or as upload_job_id in attachments when you
attach files to a task or add a task comment or thread reply.
Each job_id can be used once.string
The MIME type that was specified in the request.
Complete Upload Flow
After receiving the upload URL, you need to upload your file:Error Responses
See the Errors page for the full error format reference.File Size Limits
- Maximum file size: 1 GB per file. A larger file is refused with
upload_too_largewhen it is attached - Maximum total attachments per question: 10 files
- Files are automatically deleted after 30 days for security
Notes
- Upload URLs expire after 1 hour
- Files must be uploaded using a PUT request with the exact content type specified
- Pass the
job_idasupload_job_idinattachments, on agent questions and on the task file, comment and thread reply endpoints - Each
job_idcan be used once. Using it creates the file; the task response lists the new file’sid