Build on Shruwd

Prompts API

Manage the fixed set of questions Shruwd asks each engine every cycle.

Paths on this page are relative to https://shruwd.io/api/v1.

MethodPathScopeRole
GET/brands/{brandId}/promptsreadviewer
POST/brands/{brandId}/promptswriteeditor
PATCH/prompts/{promptGroupId}writeeditor
DELETE/prompts/{promptGroupId}writeeditor

A prompt is addressed by its promptGroupId — the identity that survives edits. promptId is the current version and is returned for reference.

List prompts

curl "https://shruwd.io/api/v1/brands/northwind/prompts?engine=google_aio&from=2026-08-01" \
  -H "Authorization: Bearer $SHRUWD_API_KEY"

Returns active prompts. Pass engine, from and to to include per-prompt coverage for that window — mention rate, plus counts of answers that named nobody and prompts the engine produced no AI answer for.

Add prompts

Batch, and atomic.

curl -X POST "https://shruwd.io/api/v1/brands/northwind/prompts" \
  -H "Authorization: Bearer $SHRUWD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompts": [
      { "text": "best project management software for small teams", "intent": "commercial" },
      { "text": "planwell alternatives", "intent": "comparison", "tags": ["competitor"] }
    ]
  }'
FieldRequiredNotes
textYes1–500 characters, trimmed
intentYesOne of the five below. It decides which diagnostics apply
tagsNoFree-form, for grouping. Up to 20
pageNoThe page on your own site that should answer it. Findings about the question name it

Intents

IntentFor
commercial"Best X for Y" — a buyer ready to choose
comparison"X vs Y", "alternatives to X" — where competitors get named
informational"How does X work" — learning, not yet buying
navigationalLooking for a specific brand or page by name
problemDescribes the problem, not a product

Errors

CodeStatus
duplicate_prompt409That text is already active on this brand
plan_limit409The batch would exceed your prompt cap
invalid_page422page is not a URL on your own site. details.domains lists them

plan_limit refuses the whole batch. Submitting 30 prompts against a 25-prompt plan gets you an error and the numbers — details carries limit, current and submitted — not 25 silently accepted. Prompts are counted across every brand in the workspace, including brands your key cannot reach.

Update a prompt

curl -X PATCH "https://shruwd.io/api/v1/prompts/$groupId" \
  -H "Authorization: Bearer $SHRUWD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"intent":"comparison"}'

Accepts text, intent, tags, active and page.

ChangingEffect
text or intentStarts a new version. Past measurements stay attached to the wording that produced them, and the new version starts from zero responses. The page carries over
tags, active or pageUpdated in place. They do not change what is asked

page is the page on your own site that should answer the question. Findings about the question name it from the next measurement; null clears it. A finding with no page to name has recommendation.target null, and its subjectRef is the promptGroupId to set one on.

Reactivating with active: true counts as a creation against your plan limit.

Remove a prompt

curl -X DELETE "https://shruwd.io/api/v1/prompts/$groupId" \
  -H "Authorization: Bearer $SHRUWD_API_KEY"

Deactivates it. Nothing is deleted — it stops being asked from the next cycle on and its history is kept. The slot is freed against your plan limit.

Next steps