Template Docs Commerce APIs Webhooks Tools
Get Started
Get Started

Retrieve basic site information

GET https://api.squarespace.com/{api-version}/authorization/website

Websites on Squarespace can have many API keys or OAuth tokens, though a given API key or OAuth token can only belong to one website. Use the Authorization API endpoint to identify which website is associated with an API key or OAuth token. The response provides basic site information to aid in development when using Commerce APIs.

Parameters

{api-version} string
required

The current version for the Authorization API is 1.0.

Request example

curl "https://api.squarespace.com/1.0/authorization/website" \
  -i \
  -H "Authorization: Bearer YOUR_SECRET_API_KEY" \
  -H "User-Agent: YOUR_PRODUCT / YOUR_PRODUCT_VERSION" \
  -H "Content-Type: application/json"

If you're new to Commerce APIs, read the Making requests guide to learn more about how to access this endpoint.

Response example

A successful request generates a response in JSON.

{
  // Id of the website that owns the API key or OAuth.
  "id": "5863f6faf7e0abc3cf95ce3a",

  // Identifier, or subdomain, of the website within squarespace.com.
  "siteId": "developers",

  // The website's title.
  "title": "Squarespace Developers",

  // The website's canonical URL, which specifies the website's custom domain when available.
  "url": "https://developers.squarespace.com",

  // The currency the website uses for commerce needs.
  // Configured in "Commerce > Payments".
  "currency": "USD",

  // The measurement standard the website uses for commerce needs, such as product dimensions.
  // Possible values are 'IMPERIAL' and 'METRIC'.
  // Configured in "Settings > Language & Region" in the Squarespace UI.
  "measurementStandard": "METRIC",

  // An ISO language and country code associated with the website.
  // This doesn't reflect the language shown to users in the Squarespace UI.
  // Configured in "Settings > Language & Region" in the Squarespace UI.
  "language": "en-US",

  // The time zone associated with the website.
  // Configured in "Settings > Language & Region" in the Squarespace UI.
  "timeZone": "America/New_York",

  // Physical business location information associated with the website;
  // object doesn't include street address nor name of the business.
  // Configured in "Settings > Business Information" in the Squarespace UI.
  "location": {
      "region": "New York, NY, 10014",
      "country": "United States"
  }
}