Skip to content

Retrieve a template

GET/v1/templates/{slug}Key scope read

Returns one template by slug with its published configuration: fields, policies, triggers, content rules, severity thresholds, AI instructions and settings. Archived templates are returned too.

Needs a key with the read scope. Authentication

curl https://api.useinfrared.com/v1/templates/listing \
  -H "Authorization: Bearer $INFRARED_KEY"
200 OKResponse
{
  "object": "template",
  "id": "tpl_64mYq4nD3NXNfu0gcdaMZa",
  "slug": "listing",
  "name": "Listing",
  "description": null,
  "status": "active",
  "built_in": false,
  "version": 2,
  "context": "A public listing on a marketplace: an item, a service, a property or a vehicle for sale or rent, with a price and photos of what is offered. Buyers contact the seller through the platform.",
  "fields": [
    {
      "key": "title",
      "name": "Title",
      "type": "text",
      "required": true,
      "triggers": [
        {
          "effect": "flag",
          "policy": "hate_speech"
        },
        {
          "effect": "flag",
          "policy": "links_contact"
        }
      ],
      "validation": {
        "max_length": 120,
        "min_length": 5
      },
      "description": "Short headline naming what is offered."
    },
    {
      "key": "description",
      "name": "Description",
      "type": "text",
      "required": true,
      "triggers": [
        {
          "effect": "flag",
          "policy": "profanity"
        },
        {
          "effect": "flag",
          "policy": "toxicity"
        }
      ],
      "validation": {
        "max_length": 5000
      },
      "description": "What is offered: condition, specifications, terms and details."
    },
    {
      "key": "price",
      "name": "Price",
      "type": "number",
      "required": false,
      "triggers": [],
      "validation": {
        "min": 0
      },
      "description": "The asking price in the listing's currency."
    },
    {
      "key": "photos",
      "name": "Photos",
      "type": "image",
      "required": false,
      "triggers": [
        {
          "effect": "review",
          "policy": "made_with_ai",
          "threshold": 0.9
        }
      ],
      "validation": {
        "max_bytes": 10485760,
        "max_items": 10
      },
      "description": "Photos of what is offered: the item, property, vehicle or premises. Logos, labels and signage with the seller's own details are normal."
    }
  ],
  "policies": [
    {
      "key": "profanity",
      "mode": "trigger"
    },
    {
      "key": "hate_speech",
      "mode": "trigger"
    },
    {
      "key": "toxicity",
      "mode": "trigger"
    }
  ],
  "triggers": [
    {
      "effect": "flag",
      "policy": "hate_speech"
    },
    {
      "effect": "flag",
      "policy": "toxicity"
    },
    {
      "effect": "flag",
      "policy": "violence"
    }
  ],
  "rules": [
    {
      "id": "r1",
      "name": "Block banned authors",
      "action": "reject",
      "enabled": true,
      "conditions": [
        {
          "op": "is_not",
          "type": "author_status",
          "value": "enabled"
        }
      ]
    },
    {
      "id": "r2",
      "name": "Zero tolerance for hate",
      "action": "reject",
      "enabled": true,
      "conditions": [
        {
          "type": "policy_flagged",
          "value": true,
          "policy": "hate_speech"
        }
      ]
    },
    {
      "id": "r3",
      "name": "Illicit goods",
      "action": "reject",
      "enabled": true,
      "conditions": [
        {
          "type": "policy_flagged",
          "value": true,
          "policy": "illicit"
        }
      ]
    }
  ],
  "severity": {
    "reject": 0.8,
    "review": 0.4
  },
  "ai_instructions": "Check that the title, description, price and photos describe the same offer, that the photos show what is offered rather than unrelated or stock images, and that the price is plausible for what is described. Flag listings that only advertise another website or ask buyers to pay outside the platform.",
  "settings": {},
  "created_at": "2026-10-08T08:44:31.624Z",
  "updated_at": "2026-10-08T09:28:01.454Z"
}

Path parameters

slugstringRequired

Slug of the template, for example listing. basic is the built-in basic check.

Returns

The template.

Errors

404
template_not_found

The project has no template with this slug.

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.