Back to Content Management API

siteSettings

Returns the site settings in a draft or published state.

Arguments

  • Name
    version
    Type
    Version
    Description

    The state of the section you want to retrieve.

    • To get the latest content use CURRENT.
    • To get the latest published content use PUBLISHED

Returns

Request

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

const query = `
query GetSiteSettings($version: Version) {
  siteSettings(version: $version) {
    id
    seo
  }
}
`
const response = await packClient.fetch(query);
console.log(response.data);

Response

{
    "data": {
        "siteSettings": {
            "id": "site-id",
            "seo": {
                "title": "SEO Title",
                "description": "SEO Description",
                "keywords": "SEO Keywords"
            }
        }
    }
}

Was this page helpful?