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

Request

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

Request body

styleguideIdstring required

Developer ID of the style guide to attach the rules to (from GET /styleguides).

sectionIdstring required

ID of the section within the style guide to attach the rules to (from GET /styleguides).

Example request

{
  "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"
        }
      ],
      "tags": []
    }
  ]
}

Response

Returns the Developer IDs of the created rules, in request order

idsstring[] required

Developer IDs of the created rules, in request order.

Example response

{
  "ids": [
    "be-concise"
  ]
}

Changes

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