Skip to navigation

Upload a file through a one-time link

Beta

Send one file through a link from POST /api/v0/assets/upload-links: the body is the file’s bytes and X-Athena-Upload-Token the link’s credential; no API key is needed. Athena runs POST /api/v0/assets/create-from-file as the person who asked for the link, with every gate again (an agent run’s tool policy included), and answers with the new asset. A link works once: the first upload spends it, whatever its answer.

Authentication

X-API-KEYstring
API Key authentication via header

Path parameters

Headers

X-Athena-Session-CredentialstringOptional
X-Athena-Upload-Tokenstring or nullOptional

The link’s one-time credential, from its headers

Request

This endpoint expects binary data of type application/octet-stream.

Response

The asset made from the file
asset_idstring
ID of the newly created asset
asset_typestring
Type of the created asset
created_atstring
Timestamp when the asset was created
titlestring
Title of the created asset
parent_folder_idstring or nullOptional
ID of the parent folder
workspace_idstring or nullOptional
ID of the workspace that owns the created asset

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
410
Gone Error
413
Content Too Large Error
422
Unprocessable Entity Error
502
Bad Gateway Error
503
Service Unavailable Error