Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

Your Moonbase API key.

Body

multipart/form-data

The file content and optional metadata to upload.

Parameters for uploading a File object.

file
file
required

The raw file content to upload in a multipart/form-data request. Must be 5 MB or smaller.

Maximum string length: 5242880
name
string

The display name of the file.

associations
ItemPointerParam · object[]

Link the File to Moonbase items like a person, organization, deal, task, or an item in a custom collection.

Response

Upload succeeded.

The File object represents a file that has been uploaded to your library.

type
string
required

String representing the object’s type. Always file for this object.

Allowed value: "file"
id
string
required

Unique identifier for the object.

name
string
required

The display name of the file.

filename
string
required

The original filename of the uploaded file.

size
number
required

The size of the file in bytes.

download_url
string<uri>
required

A temporary, signed URL to download the file content. The URL expires after one hour.

associations
ItemPointer · object[]
required

A list of items this file is associated with.

created_at
string<date-time>
required

Time at which the object was created, as an ISO 8601 timestamp in UTC.

updated_at
string<date-time>
required

Time at which the object was last updated, as an ISO 8601 timestamp in UTC.