Style guides

Update a style guide

Updates a style guide's name, description, enabled-by-default setting, or sections.

Each style guide is identified by its developer ID. Only provided fields are modified.

patch/styleguides

Request

  • Base URL: https://api.dittowords.com/v2
  • URL: https://api.dittowords.com/v2/styleguides
  • Auth: API key in header Authorization

Request body

developerIdstring required

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

newDeveloperIdstring

A new developer ID for this style guide. Must be unique among the workspace's style guides. Can be set alongside other field changes in the same update. Not supported for the built-in Ditto Style Guide.

namestring

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

descriptionstring

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

enabledByDefaultboolean

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

variantIdstring nullable

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.

Example request

{
  "developerId": "acme-inc",
  "name": "Acme Inc. Style Guide"
}

Response

Returns success status of the update operation

successboolean required

Indicates whether the update was successful

Example response

{
  "success": true
}

Changes

No recorded changes to this operation across all 1 revision of this API.