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:
| Operation | Endpoint | What it does |
|---|---|---|
| Apply tone | POST /api/v1/prompts/apply-tone |
Retone every prompt in a page-type category (no credits) |
| Bulk regenerate | POST /api/v1/prompts/bulk |
Regenerate prompts across many pages at once |
| Regenerate one | POST /api/v1/prompts/regenerate |
Regenerate a single page’s prompt |
| Export | GET /api/v1/prompts/:siteId/export |
Export a site’s prompts as JSON |
| Import | POST /api/v1/prompts/:siteId/import |
Restore 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.