Skip to main content
POST
Create a style guide

Authorizations

Authorization
string
header
required

Body

application/json
name
string
required

The name of the new style guide.

Minimum string length: 1
description
string
required

A description of the style guide's purpose.

Minimum string length: 1
sections
object[]

Sections to organize rules and word list entries into. If omitted, a default set of sections is used.

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.

enabledByDefault
boolean

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

variantId
string

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. Omit for a style guide that should apply to all text.

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

Response

Returns the developer ID and name of the created style guide

id
string
required

The Developer ID of the created style guide

name
string
required

The name of the created style guide