Update Swatch
This endpoint is 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.
Updates a site-owned swatch color and name by swatchId. All fields are optional, thus omitted fields keep their current values.
Authentication
Path parameters
Request
The name of the swatch. This field is optional, and omitting it leaves the current name unchanged. Null or empty strings are not permitted. Swatch groups are sorted based on name prefix, thus changing from ‘White’ to ‘Neutrals / White’ will move the swatch into the site’s corresponding swatch group.
Hue value between [0, 360]. This field is optional, and omitting it leaves the current value unchanged. Null is not permitted.
Saturation value between [0, 100]. This field is optional, and omitting it leaves the current value unchanged. Null is not permitted.
Lightness value between [0, 100]. This field is optional, and omitting it leaves the current value unchanged. Null is not permitted.
Response
The id to use wherever a color prop references this swatch (e.g. the “swatchId” inside backgrounds/border/boxShadow/text-color payloads) - NOT the plain “id” field above which is used in other api calls like update_swatch.