{{define "content"}}{{with .Data}}

Supermarket's JSON API

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.

Using it

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.

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.

{{range .Docs}}

POST /api/v1/{{.Name}} {{.Scope}}

{{.Description}}

Arguments (JSON Schema)
{{.Schema}}
{{end}} {{end}}{{end}}