Skip to content

Publish site assets

POST
/api/sites/{id}/publish
curl --request POST \
--url https://example.com/api/sites/example/publish \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "items": [ "example" ], "force": true }'

Publishes all draft items on the site

id
required

Site ID

string
Media typeapplication/json
object
items

Specific item IDs to publish (publishes all if empty)

Array<string>
force

Force republish even if already published

boolean
Examplegenerated
{
"items": [
"example"
],
"force": true
}

Assets published successfully

Media typeapplication/json
object
success
required

Whether publish was successful

boolean
publishedCount

Number of items published

number
message

Status message

string
Examplegenerated
{
"success": true,
"publishedCount": 1,
"message": "example"
}