Back to Content Management API

contentRelease

Returns a content release by ID or handle. Provide one of id or handle. Request drafts to list the content staged in the release and conflicts to find live content that changed after it was added to the release.

Arguments

  • Name
    id
    Type
    ID
    Description

    The ID of the release.

  • Name
    handle
    Type
    String
    Description

    The handle of the release. Used when id is not provided.

Returns

  • Name
    ContentRelease.*
    Type
    ContentRelease
    Description

    Any requested field from the ContentRelease object. Returns null when no release matches.

Request

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

const query = `
  query ContentRelease($id: ID) {
    contentRelease(id: $id) {
      id
      name
      status
      scheduledPublishAt
      drafts {
        contentType
        contentId
        title
        updatedAt
      }
      conflicts {
        contentType
        contentId
        baseVersion
        currentVersion
      }
    }
  }
`
const variables = {
  id: 'release-id',
}
const response = await packClient.fetch(query, { variables })
console.log(response.data)

Response

{
  "data": {
    "contentRelease": {
      "id": "release-id",
      "name": "Holiday launch",
      "status": "open",
      "scheduledPublishAt": null,
      "drafts": [
        {
          "contentType": "page",
          "contentId": "page-id",
          "title": "Home",
          "updatedAt": "2026-09-20T15:04:12.000Z"
        }
      ],
      "conflicts": []
    }
  }
}

Was this page helpful?