Skip to content

Attach or use a photo in content

POST
/cms/photo/{id}/use
curl --request POST \
--url https://api.example.com/cms/photo/1/use \
--header 'Content-Type: application/json' \
--data '{ "id": 1, "inline": true }'

Creates a new attachment for an existing photo and associates it with a content item.

id
required
integer

Photo attachment id

Media typeapplication/json
object
id

Existing article id. If omitted, a new draft article is created.

integer
inline

If true, creates an inline image attachment.

boolean

Example generated

{
"id": 1,
"inline": true
}

Attachment added

Media typeapplication/json
object
id

New Attachment ID

integer
content_id

Content ID the attachment was added to

integer

Example generated

{
"id": 1,
"content_id": 1
}