Back to Content Management API

contentReleasePublish

Publishes every draft in a content release together. If live content changed after it was added to the release, the publish fails with a conflict error. Review conflicts on the release, then rebase the affected drafts with contentReleaseRebaseDraft or set overwriteConflicts.

Arguments

  • Name
    id
    Type
    ID!
    Description

    The ID of the release you want to publish.

  • Name
    publishComment
    Type
    String
    Description

    An optional comment recorded with the publish.

  • Name
    overwriteConflicts
    Type
    Boolean
    Description

    Publish even when conflicts exist, replacing the newer live content. Set this only after reviewing conflicts.

Returns

Request

import { PackClient } from '@pack/client'
const packClient = new PackClient({
  token: 'YOUR-PACK-TOKEN',
})

const query = `
  mutation ContentReleasePublish($id: ID!, $publishComment: String) {
    contentReleasePublish(id: $id, publishComment: $publishComment) {
      id
      status
      publishedAt
    }
  }
`
const variables = {
  id: 'release-id',
  publishComment: 'Holiday launch',
}
const response = await packClient.fetch(query, { variables })
console.log(response.data)

Response

{
  "data": {
    "contentReleasePublish": {
      "id": "release-id",
      "status": "published",
      "publishedAt": "2026-11-27T05:00:00.000Z"
    }
  }
}

Was this page helpful?