Manage site swatches from the REST API

Five new v4 endpoints let you create, read, update, and delete a site’s colors from the REST API.

GET /v4/swatches?siteId={siteId}

Returns a site’s swatches, with cursor-based pagination through limit (1–100, default 20) and startingAfter.

POST /v4/swatches

Adds a swatch to a site. siteId, hue, saturation, and lightness are required; name is optional.

GET /v4/swatches/{id}

Returns a single swatch.

PATCH /v4/swatches/{id}

Changes a swatch’s name, hue, saturation, or lightness. Omitted fields keep their current values. Swatches are grouped by name prefix, so renaming White to Neutrals / White moves the swatch into the Neutrals group.

DELETE /v4/swatches/{id}

Removes a swatch.

Each swatch stores its color as HSL values: hue (0–360), saturation (0–100), and lightness (0–100).

The GET apis both provide id and referenceId for each swatch returned. All 5 endpoints above use id. referenceId is the value that appears as swatchId in a page’s element tree (GET /v6/pages/:id?expand=elements). Use it as a reference to find swatches in page content.

The swatch endpoints are part of the Resource APIs project, currently in Beta, and may change. Requests return 403 until the feature is enabled for your site or workspace. To opt-in, please contact support: support@makeswift.com.

For details, see List Swatches, Create Swatch, Get Swatch, Update Swatch, and Delete Swatch.