Skip to navigation

Create a one-time link to upload a file

Beta

Mint a one-time link that takes one file without an API key, for a caller that can run a shell command but holds no key, such as an agent connected through an Athena MCP server. The file’s name decides what it becomes, as with POST /api/v0/assets/create-from-file: a .md, .markdown, .txt or .text file an Athena document, a .html or .htm file a user interface, a .docx file a Word document and a .pptx, .potx, .ppt or .pps file a presentation. The gates of create-from-file run now (membership in the workspace, EDIT on parent_folder_id, the deployment’s offering, an agent run’s tool policy) and again when the file arrives. Send the file’s bytes as the body of one PUT to upload_url with the X-Athena-Upload-Token header (the curl field is that command); its answer is the new asset. A link works once, for 15 minutes.

Authentication

X-API-KEYstring
API Key authentication via header

Headers

X-Athena-Session-CredentialstringOptional

Request

This endpoint expects an object.
file_namestringRequired1-255 characters

The name of the file you will send, which decides what it becomes, as in POST /api/v0/assets/create-from-file: a .md, .markdown, .txt or .text file an Athena document, a .html or .htm file a user interface, a .docx file a Word document and a .pptx, .potx, .ppt or .pps file a presentation

parent_folder_idstring or nullOptional

Folder to put the new asset in; you need EDIT on it

titlestring or nullOptional<=500 characters

Title for the new asset; defaults to the file’s name

workspace_idstring or nullOptional

Workspace to create the asset in; defaults to parent_folder_id’s, else your current one

Response

The link, its header and a curl command
asset_typestring
What the file becomes
curlstring

A curl command that sends the file, every argument shell-quoted; replace the path placeholder with your file’s path. It prints the new asset as JSON

expires_atstring

When the link stops working (UTC)

file_namestring
The file the link takes
headersmap from strings to strings

Headers the upload must carry: X-Athena-Upload-Token, the link’s one-time credential. It works once, until expires_at

max_bytesinteger
The largest file the link takes
upload_urlstring

Where to send the file: one PUT, its body the file’s bytes

method"PUT"OptionalDefaults to PUT
The HTTP method the upload uses

Errors

403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
503
Service Unavailable Error