Skip to main content
POST
/
api
/
files
/
file
Upload file
curl --request POST \
  --url https://api.example.com/api/files/file \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'file=<string>'
{
  "owner_id": "<string>",
  "name": "<string>",
  "size": 123,
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "bucket_name": "<string>",
  "source_url": "<string>",
  "s3_url": "<string>",
  "access_count": 0,
  "created_at": "2023-11-07T05:31:56Z",
  "accessed_at": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.nx1cloud.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

multipart/form-data
file
string | null

The file to upload.

Response

File uploaded successfully.

owner_id
string
required

The logged in user's email ID.

name
string
required

Name of the uploaded file.

size
integer
required

Size of the file in bytes.

id
string<uuid> | null

Unique ID for the file.

bucket_name
string | null

Name of the S3 bucket where the file is stored.

source_url
string | null

URL from which the file was originally uploaded.

s3_url
string | null

S3 URL of the uploaded file.

access_count
integer
default:0

Number of times the file has been accessed.

created_at
string<date-time>

Timestamp when the file was created.

accessed_at
string<date-time> | null

Timestamp when the file was last accessed.