List Sites

GET /v2/sites

Lists the Square Online sites that belong to a seller. Sites are returned in descending order by the created_at date.

Permissions: ONLINE_STORE_SITE_READ

Response fields

Name Type Description
errors Error [ ] Any errors that occurred during the request.
sites Site [ ] The sites that belong to the seller. Returns empty object ({ }) if none are found.

Example request

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

Example response

{
  "sites": [
    {
      "id": "site_278075276488921835",
      "site_title": "My Second Site",
      "domain": "mysite2.square.site",
      "is_published": false,
      "created_at": "2023-11-06T10:01:42.000000Z",
      "updated_at": "2023-11-06T13:22:51.000000Z",
      "site_theme_id": "site_theme_413f6836-4c8d-4fee-8cb1-6d8bd042c880"
    },
    {
      "id": "site_102725345836253849",
      "site_title": "My First Site",
      "domain": "mysite1.square.site",
      "is_published": true,
      "created_at": "2021-06-18T17:45:13.000000Z",
      "updated_at": "2022-12-23T02:19:10.000000Z"
    }
  ]
}