Skip to content

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

curl -X PATCH https://api.useinfrared.com/v1/guidelines/gl_1LEog5dec7KKCgP7InZcWk \
  -H "Authorization: Bearer $INFRARED_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "examples": {
      "violating": [
        "Designer handbag, 1:1 replica, comes with box and dust bag."
      ],
      "compliant": ["Leather handbag made by a local workshop, no branding."]
    }
  }'
200 OKResponse
{
  "object": "guideline",
  "id": "gl_1LEog5dec7KKCgP7InZcWk",
  "project_id": "prj_0TBAgHGtdMketrbltGFHuk",
  "slug": "no-replica-goods",
  "policy": "guideline/no-replica-goods",
  "title": "No replica goods",
  "instructions": "Listings must not offer replicas, counterfeits or unauthorised copies of branded goods. Flag wording such as replica, 1:1 copy or mirror quality.",
  "examples": {
    "violating": [
      "Designer handbag, 1:1 replica, comes with box and dust bag."
    ],
    "compliant": ["Leather handbag made by a local workshop, no branding."]
  },
  "enabled": true,
  "position": 1,
  "created_at": "2026-10-08T09:29:23.856Z",
  "updated_at": "2026-10-08T09:29:25.102Z"
}

Path parameters

idstringRequired

Id of the guideline: gl_ plus 22 base62 characters.

Request body

titlestring

A short name for the rule, 1 to 200 characters.

instructionsstring

The rule in plain language, 1 to 4,000 characters.

examplesobject

Sample texts that sharpen the rule. The object replaces the stored examples as a whole: a list you leave out becomes empty.

violatingarray

Up to 20 texts that break the rule, each up to 500 characters.

compliantarray

Up to 20 texts that follow the rule, each up to 500 characters.

enabledboolean

Whether the guideline is evaluated. A disabled guideline scores 0 on the templates that enable it.

positioninteger

Place of the guideline in the list and in the prompt, an integer from 0. Other guidelines are not renumbered.

Returns

The updated guideline.

Errors

404
not_found

The key's project has no guideline with this id.

422
validation_error

A value is empty or too long, position is 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.