Skip to main content
PATCH

Authorizations

Authorization
string
header
required

Body

application/json
developerId
string
required

Developer ID of the style guide to update. Use 'default' to update the built-in Ditto Style Guide's enabled-by-default setting.

Minimum string length: 1
name
string

New name for the style guide. If not provided, name remains unchanged.

Minimum string length: 1
description
string

New description for the style guide. If not provided, description remains unchanged.

Minimum string length: 1
enabledByDefault
boolean

Whether this style guide is enabled by default for all projects.

variantId
string | null

Developer ID of a variant to scope this style guide to — its rules then apply only to text in that variant. Currently, this is only supported for variants with a locale code. Pass null to clear the variant so the style guide applies to all text. If not provided, the variant is unchanged.

Scoping a style guide to a variant is how it's associated with a locale, because a locale in Ditto is a variant's locale code. Use GET /v2/variants to find the variant whose locale code matches the locale you want, rather than inferring it from the variant's name.

Minimum string length: 1
sections
object[]

Full replacement list of sections — the array you pass replaces all existing sections.

Each section's sectionId must be unique within the style guide, and the list must include at least one 'rules' section and one 'wordlist' section. Rules belonging to a removed section are automatically moved to the first remaining rules section.

Response

Returns success status of the update operation

success
boolean
required

Indicates whether the update was successful