Create Theme

POST /v2/sites/{site_id}/themes

Initializes a blank custom theme for a Square Online site. A site can have one theme. This operation creates a theme directory in the directory structure of the site.

Permissions: ONLINE_STORE_CUSTOM_THEME_WRITE

Path parameters

Name Type Description
site_id string Required The ID of the site.

Response fields

Name Type Description
errors Error [ ] Any errors that occurred during the request.
theme Theme The new theme.

Example request

curl https://connect.squareup.com/v2/sites/site_id0/themes \
  -X POST \
  -H 'Square-Version: 2023-09-25' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json'

Example response

{
  "theme": {
    "id": "site_theme_413f6836-4c8d-4fee-8cb1-6d8bd042c880"
  }
}