Skip to main content
POST
/
v2
/
FileCreate
Store a file for a user
curl --request POST \
  --url http://localhost:3000/v2/FileCreate \
  --header 'Content-Type: application/json' \
  --header 'X-Bunker-Token: <api-key>' \
  --data '
{
  "identity": "<string>",
  "filename": "<string>",
  "filedata": "aSDinaTvuI8gbWludGxpZnk=",
  "mimetype": "<string>",
  "slidingtime": "<string>",
  "finaltime": "<string>",
  "request_metadata": {}
}
'
{
  "status": "ok",
  "token": "<string>",
  "fileuuid": "<string>",
  "duplicate": true
}

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')

request_metadata
object

Additional metadata for the request

Response

200 - application/json

File stored successfully

status
string
Example:

"ok"

token
string

User's unique token

fileuuid
string

Unique identifier of the stored file

duplicate
boolean

True if the file content already existed for this user