{{define "content"}}{{with .Data}}
For scripts that aren't MCP clients. It's the same tools agents use over MCP ({{.MCP}}), as plain HTTP, with the same keys, scopes, limits and approvals.
Every call needs an agent's key, made under Settings → Agents: Authorization: Bearer sm_…. A key is given modules, each to read or to read and act; it can call only the tools those allow.
GET {{.Base}}/tools: what your key may call, with each tool's input schema.POST {{.Base}}/<tool>: call a tool. The body is a JSON object of its arguments (or empty); the answer is JSON.curl -s -X POST {{.Base}}/content_drafts \
-H "Authorization: Bearer $SUPERMARKET_KEY" \
-H "Content-Type: application/json" -d '{"status": "waiting"}'
Errors are {"error": "…"}: 401 for a wrong key, 403 for a paused agent, 404 for a tool your key isn't given, 400 for arguments that don't fit, 422 when the tool says no (a draft that's too long), 429 over the agent's calls a minute.
Sending things out (content_publish, outreach_send, mailing_list_add, seo_apply_change) waits for a person's approval in Supermarket, unless that kind was allowed on its own; the answer says which, and approvals_status says what was decided.
POST /api/v1/{{.Name}} {{.Scope}}{{.Description}}
{{.Schema}}