Back to Content Management API

siteSettingsPublish

Publishes the site settings.

Arguments

  • Name
    id
    Type
    ID!
    Description

    The ID of the site settings object you want to publish.

  • Name
    publishComment
    Type
    String
    Description

    An optional string to comment on the site settings publish.

Returns

Request

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

const query = `
  mutation SiteSettingsPublish($id: ID!) {
    siteSettingsPublish(id: $id) {
      id
      status
      settings
      seo {
        title
        description
      }
      favicon
      publishedAt
    }
  }
`;

const variables = {
  id: 'YOUR-SITESETTINGS-ID'
};

const response = await packClient.fetch(query, { variables: variables });
console.log(response.data);

Response

{
    "data": {
        "siteSettingsPublish": {
            "id": "YOUR-SITESETTINGS-ID",
            "status": "published",
            "settings": {
                "header": {
                    "announcementBar": {
                        "text": "Free shipping over $50"
                    }
                }
            },
            "seo": {
                "title": "My Store",
                "description": "Shop the latest products."
            },
            "favicon": "https://cdn.example.com/favicon.png",
            "publishedAt": "2026-10-16T15:00:00.000Z"
        }
    }
}

Was this page helpful?