Publish an Entry
Mints a new immutable version from the entry’s current draft and makes it the live published version.
Endpoint
[POST]
/{collection_slug}/{entry_uuid}/publishPermissions
Project token with the update ability.
Path Parameters
| Name | Required | Description |
|---|---|---|
collection_slug | Yes | Collection slug |
entry_uuid | Yes | Entry UUID |
Example
import { createClient } from '@elmapicms/js-sdk'
const client = createClient({
baseUrl: 'https://your-domain.com/api',
projectId: 'YOUR_PROJECT_UUID',
apiKey: 'YOUR_PROJECT_TOKEN',
})
await client.content.publish('blog-posts', 'a1b2c3d4-e5f6-7890-1234-567890abcdef')curl -X POST "https://your-domain.com/api/blog-posts/a1b2c3d4-e5f6-7890-1234-567890abcdef/publish" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_PROJECT_TOKEN" \
-H "project-id: YOUR_PROJECT_UUID"After publish, GET …?state=published serves the new snapshot and is_draft_dirty is cleared.
See also: Unpublish, Versions, Creating & Editing Content.