Workspace and rules
Bind one app or website to the calling tenant and store its natural-language research rules.
A subscription owns one tenant-isolated workspace. The workspace is derived from the bearer key;
customer operations never accept an accountId or another tenant's workspaceId.
Set the workspace
Set an Apple App Store URL or HTTPS website once:
curl -X POST https://api.viralquery.com/v1/workspace \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://apps.apple.com/app/id6480417616","name":"Cal AI"}'Repeating the same identity is idempotent. A subscription cannot silently switch to another app or
website; attempting that returns 409 workspace_already_set.
Read the calling key's workspace with GET /v1/workspace.
Save natural-language rules
Rules are plain text because the internal research agent interprets them when a scroll begins:
curl -X PUT https://api.viralquery.com/v1/rules \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"text":"Watch calorie tracking, food scanner, and competitor videos. Ignore bodybuilding and restaurant reviews."}'Each change creates an immutable version. Historical research runs can therefore retain the exact rules they received even after the workspace rules change. Repeating identical text does not create a new version.
Read the current version with GET /v1/rules.