Learn how to use the Sites API to list the sites for a Square seller account.
Sites API

Use the Sites API

You can use the Sites API to retrieve metadata about Square Online sites. The Sites API is used with the Snippets API to add and manage snippets on a Square Online site. For more information, see Snippets API Overview.

Square Online APIs are publicly available as part of an early access program. For more information, see Early access program for Square Online APIs.

The ListSites endpoint retrieves the Square Online sites for a seller account. The following is an example request:

List Sites
  • 1
  • 2
  • 3
  • 4
curl https://connect.squareup.com/v2/sites \
  -H 'Square-Version: 2022-09-21' \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -H 'Content-Type: application/json'

If successful, this endpoint returns a 200 OK status code and a JSON response.

  • If the associated account has one or more sites, the response contains the sites. Sites are listed in descending order by the created_at date:

  • If the associated account has no sites, the response contains an empty object:

If you need more assistance, contact Developer Support or ask for help in the Developer Forums.