Get a presigned S3 URL for direct file upload

View as Markdown
Two-step file upload flow that bypasses Atoms' API for the file bytes themselves — useful when files exceed the multipart upload limit on `POST /knowledgebase/{id}/items/upload-media` or when you want to upload from the browser without round-tripping through your backend. **Step 1**: Call this endpoint with file metadata. Atoms returns a presigned URL + a storage `key`. **Step 2**: `PUT` the file bytes directly to the presigned URL (set `Content-Type` to the same value you sent here). **Step 3**: Call [`POST /knowledgebase/compelete-file-upload`](#operation/completeKnowledgeBaseFileUpload) with the same `key` to commit the upload and start processing. Same end result as `POST /knowledgebase/{id}/items/upload-media`, just without the multipart-through-our-API hop.

Authentication

AuthorizationBearer

API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.

Request

This endpoint expects an object.
fileNamestringRequired

Original filename — used for display in the Atoms dashboard. Doesn’t have to match the S3 key.

fileSizeintegerRequired>=1

Size in bytes. Atoms uses this to enforce per-file limits before issuing the URL.

contentTypestringRequired

MIME type. You must send this EXACT value as Content-Type on the subsequent PUT to the presigned URL.

knowledgeBaseIdstringRequired

24-char hex ObjectId of the target knowledge base (from GET /knowledgebase).

Response

Presigned URL ready — upload directly to it.

statusboolean
dataobject

Errors

400
Bad Request Error
401
Unauthorized Error
500
Internal Server Error