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.

Scopes

content:images:write

Path Parameters

_id
string
required

Computed document ID (can optionally include mode and locale, e.g., id:en:published)

Pattern: ^\S+$
Example:

"ckitdo5oq004pu69kr6oxo6fr:en:published"

Body

application/json

Where to copy the document.

toLocale
string
required

The locale to copy it into: a configured locale, not the current one.

update
boolean

Overwrite the copy if one already exists there (default false: 409 conflict instead).

Response

Done.

Built-in image/media piece type for managing photos and graphics

_id
string
required
read-only

Unique identifier

Example:

"clx1234567890abcdef"

title
string
required

Image title/alt text

Example:

"Hero banner image"

slug
string
required

Its URL name: lowercase words joined by hyphens.

Example:

"hero-banner-image"

type
string
required
read-only
Example:

"@apostrophecms/image"

attachment
Attachment · object
required

The file itself: its URLs (_urls by size for an image, _url for another file), size and dimensions.

createdAt
string<date-time>
required
read-only
updatedAt
string<date-time>
required
read-only
archived
boolean | null
default:false

In the archive: kept, but out of every list and off the site until it is restored. false (or null) for a live document.

visibility
enum<string>
default:public

Who may see it on the site: public (everyone) or loginRequired (signed-in people only).

Available options:
public,
loginRequired
credit
string | null

Image credit or attribution

copyOfId
string | null

The _id of the piece/page that was copied to create this document (only present if created via _copyingId)

Example:

"ckhdscx5900054z9k88uqs16w:en:published"

alt
string | null
default:""

Image description used for accessibility

_tags
object[] | null

Its tags, as documents.

creditUrl
string | null

When set, a URL; empty or null when not.

_folder
object[] | null

The media folder holding it (one at most; empty at the library’s root).

feedId
string | null
default:""
read-only
feedGeneration
string | null
default:""
read-only
feedOrder
integer | null
read-only
feedSourceKey
string | null
default:""
read-only
aposShareKey
string | null
read-only

The draft’s preview share key, while its share link is on: the link is the draft’s _url with aposShareKey and aposShareId (the draft’s _id) in its query. Absent otherwise, and on published documents.

Example:

"k3v9x2m7q1z8w4p6"