Update a guideline
PATCH/v1/guidelines/{id}Key scope write
Updates the properties sent and leaves the others unchanged. The slug, and with it the policy key, cannot be changed.
Needs a key with the write scope. Authentication
Path parameters
idstringRequiredId of the guideline:
gl_plus 22 base62 characters.
Request body
titlestringA short name for the rule, 1 to 200 characters.
instructionsstringThe rule in plain language, 1 to 4,000 characters.
examplesobjectSample texts that sharpen the rule. The object replaces the stored examples as a whole: a list you leave out becomes empty.
violatingarrayUp to 20 texts that break the rule, each up to 500 characters.
compliantarrayUp to 20 texts that follow the rule, each up to 500 characters.
enabledbooleanWhether the guideline is evaluated. A disabled guideline scores 0 on the templates that enable it.
positionintegerPlace of the guideline in the list and in the prompt, an integer from 0. Other guidelines are not renumbered.
Returns
The updated guideline.
- 200 OKA guideline object
Errors
- 404
not_foundThe key's project has no guideline with this id.
- 422
validation_errorA value is empty or too long,
positionis not an integer from 0, or the body has an unknown key.
Every endpoint can also answer the errors any request can meet: a missing key, a rate limit, a malformed body. Errors
Something missing or unclear on this page? Write to support@useinfrared.com.