Docs / Prompts / Prompt rules & bulk ops

Prompt rules & bulk ops

Apply prompt styles at catalog scale with priority-ordered rules, and manage prompts in bulk — retone, regenerate, import and export.

Per-page prompts are great for flagship content, but a large site needs prompts applied by pattern. Prompt rules (Business and above) let you say IF a page matches THEN apply this prompt style, evaluated in priority order at scale.

How rules match

A rule has a match and a priority:

  • match.urlPattern — tests the page URL and its path. Supports * wildcards (/blog/*); a bare substring also matches (/products/).
  • match.pageType — an exact match against the detected page type (article, product, …).
  • If both are set, both must match.

When prompts regenerate, active rules are consulted in priority order — lowest number first — and the first match wins. Put your most specific rules at the top (lowest priority number) and broad catch-alls at the bottom.

Managing rules

# List rules for a site (priority order)
curl "https://api.askthis.io/api/v1/rules?siteId=cq_8f2a" -H "Authorization: Bearer <key>"

# Create a rule: product pages get the "comparison" style, high priority
curl -X POST https://api.askthis.io/api/v1/rules \
  -H "Authorization: Bearer <key>" -H "Content-Type: application/json" \
  -d '{ "siteId": "cq_8f2a", "match": { "pageType": "product" }, "priority": 10 }'

# Update or delete
curl -X PUT    https://api.askthis.io/api/v1/rules/<id> -H "Authorization: Bearer <key>" -d '{ "priority": 5 }'
curl -X DELETE https://api.askthis.io/api/v1/rules/<id> -H "Authorization: Bearer <key>"

Rules require the rules:read / rules:write API-key scopes.

Bulk operations

Beyond rules, you can operate on many prompts at once:

OperationEndpointWhat it does
Apply tonePOST /api/v1/prompts/apply-toneRetone every prompt in a page-type category (no credits)
Bulk regeneratePOST /api/v1/prompts/bulkRegenerate prompts across many pages at once
Regenerate onePOST /api/v1/prompts/regenerateRegenerate a single page’s prompt
ExportGET /api/v1/prompts/:siteId/exportExport a site’s prompts as JSON
ImportPOST /api/v1/prompts/:siteId/importRestore or migrate prompts from an export

Export/import make it easy to review prompts offline, move them between sites, or keep a versioned backup.

Next: AI Graph tags control how AI engines read the pages your prompts point at.