Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

Paste your API key as the CMS showed it: fsk_<site>_<key id>_<secret> (issued under API Keys). ApiKey in front of it works too. Leave it empty to read as the public.

Query Parameters

aposMode
enum<string>
default:published

published (the default) or draft. Drafts need a credential that may see them: an API key with the type’s write scope (content:<type>:write), or a signed-in editor. The public and a key with only the read scope get 403.

Available options:
draft,
published
aposLocale
string

The locale to read or write, e.g. en (default: the site’s default locale).

Example:

"fr"

Body

multipart/form-data
file
file
required

The file to upload

Response

File uploaded successfully

File attachment information from upload endpoint

_id
string

Unique attachment identifier

Example:

"ckj0akbxa003vp39kfbxgb8zg"

_url
string

The file’s URL: set for a file that is not an image. An image’s URLs are in _urls, by size (original is the file as uploaded).

Example:

"https://example.net/uploads/attachments/ckj0akbxa003vp39kfbxgb8zg-blue-box.png"

_urls
object

An image’s URLs by size (original, max, full, two-thirds, one-half, one-third, one-sixth); unset for other files.

name
string

Slugified filename

Example:

"blue-box"

title
string

Sortified filename

Example:

"blue box"

extension
string

File extension

Example:

"png"

type
string

Always attachment.

Example:

"attachment"

group
string

File group type

Example:

"images"

length
integer

File size in bytes

Example:

10497

md5
string

MD5 checksum

Example:

"630eeaaecd0bdc07c4a82eeca4c07588"

width
integer

Image width in pixels (images only)

Example:

600

height
integer

Image height in pixels (images only)

Example:

106

landscape
boolean

Whether image is landscape orientation (images only)

portrait
boolean

Whether image is portrait orientation (images only)

docIds
string[]

IDs of documents using this attachment

archivedDocIds
string[]

IDs of archived documents using this attachment

createdAt
string<date-time>

When it was uploaded (ISO 8601).

updatedAt
string<date-time>

When it last changed (ISO 8601).

_isCroppable
boolean

Whether the image can be cropped.

crop
object | null

The crop applied, if any (top, left, width, height).

used
boolean

Whether any document uses the file.

folderId
string | null

The media folder holding the file, by its aposDocId.

folderPath
string

That folder’s path, e.g. events/summer.