curl --request POST \
--url https://api.dittowords.com/v2/styleguides/rules \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"styleguideId": "acme-inc",
"sectionId": "foundations",
"rules": [
{
"name": "Be concise",
"description": "Remove filler words so text is easy to scan.",
"examples": [
{
"from": "Please click the button below",
"to": "Click below"
}
]
},
{
"name": "Use sentence case for headings",
"enabled": false
}
]
}
'{
"ids": [
"be-concise"
]
}{
"message": "Section 'word-list' is a wordlist; each entry must provide 'term' (and optional 'disallowed')."
}{
"message": "Style guide with developer ID 'acme-inc' not found"
}Style guides
Create style guide rules
Creates one or more rules in a style guide section.
The operation is all-or-nothing: if any rule is invalid, none are created.
POST
/
styleguides
/
rules
curl --request POST \
--url https://api.dittowords.com/v2/styleguides/rules \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"styleguideId": "acme-inc",
"sectionId": "foundations",
"rules": [
{
"name": "Be concise",
"description": "Remove filler words so text is easy to scan.",
"examples": [
{
"from": "Please click the button below",
"to": "Click below"
}
]
},
{
"name": "Use sentence case for headings",
"enabled": false
}
]
}
'{
"ids": [
"be-concise"
]
}{
"message": "Section 'word-list' is a wordlist; each entry must provide 'term' (and optional 'disallowed')."
}{
"message": "Style guide with developer ID 'acme-inc' not found"
}Authorizations
Body
application/json
Developer ID of the style guide to attach the rules to (from GET /styleguides).
Minimum string length:
1ID of the section within the style guide to attach the rules to (from GET /styleguides).
Minimum string length:
1- Option 1 · object[]
- Option 2 · object[]
Show child attributes
Show child attributes
Response
Returns the Developer IDs of the created rules, in request order
Developer IDs of the created rules, in request order.