Skip to main content
POST
Store a file for a user

Authorizations

X-Bunker-Token
string
header
required

API token for authentication

Body

application/json
mode
enum<string>
required

Mode of user identification

Available options:
login,
token,
email,
phone,
custom
identity
string
required

User identifier corresponding to the mode

filename
string
required

Name of the file (1-255 characters)

filedata
string<byte>
required

Base64-encoded file content

mimetype
string

MIME type of the file. If omitted, it is auto-detected from the content.

slidingtime
string

Sliding retention period for the file (e.g., '30d', '1y')

finaltime
string

Absolute expiration time for the file (e.g., '90d', '2026-01-01')

tags

File tags. Accepts an array of strings or a comma-separated string. Tags are lowercased and de-duplicated, must match ^[a-z0-9][a-z0-9._-]{0,49}$, and at most 16 are kept per file. Tags drive file-level authorisation.

request_metadata
object

Additional metadata for the request

Response

File stored successfully

status
string
Example:

"ok"

token
string

User's unique token

fileuuid
string

Unique identifier of the stored file

tags
string[]

The normalised tag set stored with the file

duplicate
boolean

True if the file content already existed for this user