API reference
POST /uploads/create-target
Returns a presigned S3 POST so you can upload an attachment for use in a generation.
Parameters
The file’s original name, including extension. Used for display and to derive
the file type downstream.
The MIME type of the file (for example
application/pdf). Must be in the
allowed list — see the FAQ below.The size of the file in bytes. Capped at 50 MB; the cap is also enforced by S3
on the upload itself.
Response
The S3 endpoint to
POST the file to.Form fields that must be included in the multipart upload, in order, before
the
file field. Each entry has name and value.The S3 object key the file will be stored under.
A signed
GET URL valid for 7 days. Pass this as the url on each attachment
object when calling POST
/presentations/generate or POST
/presentations/generate/:generationId/message.Uploading the file
After this endpoint returns, post the file directly to S3 using the returnedurl and fields. The file field must come last in the form.
204 No Content. Do not send an Authorization header on this request — S3 will reject it.
Once uploaded, reference the file in a generation by passing the captured download_url:
Attachment object
FAQs
Why two steps instead of uploading directly to Chronicle?
Why two steps instead of uploading directly to Chronicle?
The presigned POST sends the file bytes straight to S3, so large attachments don’t traverse the Chronicle API. The Chronicle endpoint stays lightweight (just metadata) and the upload itself can stream through S3’s regional ingress.
Which file types are allowed?
Which file types are allowed?
.txt, .md, .pdf, .pptx, and images (.jpg, .jpeg, .png, .gif, .webp).Sending content_type outside this list returns FILE_UPLOAD_ERROR.What's the size limit?
What's the size limit?
50 MB per file. Larger files are rejected with
FILE_UPLOAD_ERROR. The cap is
enforced both at this endpoint (against declared_file_size) and at S3
(against the actual upload).How long is `download_url` valid?
How long is `download_url` valid?
7 days. As long as you reference it in a generation within that window, it’ll
work. After expiry you’ll need to upload the file again.
What workspace does the upload belong to?
What workspace does the upload belong to?
The workspace tied to your API key. Attachments are scoped to that workspace and aren’t visible to other workspaces.