Skill v1.2.1
currentAutomated scan100/100+2 new
name: my-api-hq version: 1.2.1 description: > Auth, organizations, and billing hub. Start here to get an api_key and org_id — every other service depends on both. triggers: [api key, account, organization, org, billing, balance, topup, credits, setup, defaults, brand, sync brand, doctor, health check, is my org healthy] checksum: sha256-b4eef3d505e92f2b9fe8dfa45b74d4221e3c646947ebfe8961aa5a2445bfa139
MyApiHQ
The root service. It manages accounts, API keys, organizations, and billing. No other service works without credentials from here.
Capabilities
<!-- llm:start --> MyApiHQ is the platform's foundation. Every other service (domain, funnel, auth, payments, fn, workflow, database, storage, email, webhook, crm, llm, image, pixel, url) requires both an api_key and (for org-scoped resources) an org_id minted here. Setup is one command — myapi account setup — which provisions an account, generates an api_key, creates a default org, and stores everything in ~/.myapi/config.json. Subsequent commands pick up those defaults automatically.
Anonymous vs registered accounts
Two tiers, chosen at setup time:
- Anonymous (
myapi account setup --anonymous): zero-friction account creation. Starts with $0 credit. Good for catalog browsing, reading help, inspecting schemas — nothing that costs upstream money. The agent-onboarding path: provisions an account in one call, no email needed. - Registered (verified email via
myapi account link <email>): unlocks $5 free credit and the paid surface (LLM, image, email, domain register, etc.). Required formyapi billing setupand anything that hits Stripe.
An anonymous account can upgrade at any time via myapi account link <email> — the credit grants on successful verification. Anonymous accounts that need paid actions hit a friendly REGISTRATION_REQUIRED error pointing at myapi account link; a registered account with an empty wallet hits 402 INSUFFICIENT_FUNDS (top up, or enable auto-recharge — below).
Health check
myapi doctor runs an org-wide consistency check across every slot (funnels, webhooks, domains, containers, workflows, emails, payments) and layers on customer-perspective DNS/HTTP probes from your machine. It returns per-section findings (✓ pass / ⚠ warning / ✗ critical) with remediation hints; add --json for machine output. The exit code is non-zero only on customer-actionable criticals — platform-side issues the MyAPI team is already handling are surfaced with an ℹ marker but don't fail the run. Run it to self-check before building (is the org set up?) and after (did everything wire up?). <!-- llm:end -->
Commands
<!-- generated:start -->
| Command | What it does | |||
|---|---|---|---|---|
myapi account setup | Interactive setup: creates account, generates api_key, sets defaults | |||
myapi status | Single-screen orientation: account + every resource in the default org. Start here when you don't know what exists | |||
myapi account whoami | Show current account, default org/funnel, balance, free-tier usage | |||
myapi account link [email] | Upgrade anonymous account to registered (or add a session) | |||
myapi account switch [index] | Switch active account | |||
myapi account import-key | Import an API key non-interactively (CI, Docker) | |||
| `myapi account registrant <set\ | get\ | clear>` | WHOIS contact info domain register requires (ICANN) | |
myapi org list | List all orgs (* marks the default) | |||
myapi org create --name "..." | Create a new org (--yes auto-sets as default) | |||
myapi org get [id] | Inspect one org (defaults to current default) | |||
myapi org update [id] | Update fields (name, tagline, description, business-sector, logo-url) | |||
myapi org delete <id> | Delete an org and cascade (funnels included). Verify with myapi org get <id> first; --yes required non-interactively | |||
myapi org sync-brand <domain> | Scrape a live site to auto-fill brand info | |||
myapi keys list / create / revoke <id> | Manage API keys (alias myapi account api-keys) | |||
myapi billing balance | Check balance | |||
myapi billing topup <amount> | Top up by dollar amount | |||
myapi billing history | Recent transactions | |||
| `myapi billing usage [--period month | 30d]` | Spend rolled up by service (month or trailing 30d) | ||
| `myapi billing spend-cap [<amount> | clear] [--period month | day]` | Set/show/clear the account-level spend ceiling | |
| `myapi billing auto-recharge [show \ | set \ | disable]` | Keep the wallet funded — off-session refill when balance drops below a threshold, capped monthly | |
myapi account mailing-address ["<address>"] | Get or set the account's CAN-SPAM mailing address (required for email send) | |||
myapi config set-org <id> / set-funnel <id> / set-domain <name> | Set CLI defaults | |||
myapi install-skills | Install agent skills into ~/.claude/, ~/.gemini/, ~/.cursor/ | |||
myapi doctor [--verbose] [--json] | Org-wide health check: config/integrity findings + DNS/HTTP probes |
<!-- generated:end -->
Examples
<!-- llm:start -->
# Cold start: provision account + default orgmyapi account setupmyapi org create "Acme" --yes# Day-to-daymyapi status # what exists already, in one screenmyapi account whoami # confirm what's activemyapi billing balance # before doing anything that costs creditsmyapi billing topup 20 # add $20# For unattended/autonomous runs: keep the wallet funded so a 402 never# stalls the agent. Refill to ≥$5, $20 at a time, up to $100/month.myapi billing auto-recharge set --threshold 5 --amount 20 --monthly-cap 100# Sync brand info from an existing websitemyapi org sync-brand acme.com# Switch between multiple accountsmyapi account switch 2
402 INSUFFICIENT_FUNDS → top up, or enable auto-recharge. With it on, billable commands wait out a refill-in-flight and retry by themselves — do not add your own retry loop. 402 SPEND_CAP_EXCEEDED is a ceiling you set, not an empty wallet: raise it with myapi billing spend-cap.
Each org gets a free preview subdomain (*.makeautonomous.com) usable before registering a custom domain. <!-- llm:end -->
Notes
- Set
--orgdefaults once withmyapi config set-org <id>to skip the flag on every command. - API keys have format
hq_live_...and are sent asAuthorization: Bearer <key>. org sync-brandis async (scrapes the site, polls the job).
Scoping a key — and why --org is the one that saves you
A key's authority is inline and always a subset of the key that mints it, so you can hand work a key that cannot exceed its job:
myapi keys create --name agent --org <id> --grant '*' # locked to ONE orgmyapi keys create --name ci --grant funnel:write,storage:read --spend-cap 25
--org <id>— lock it to one org. Omit for account-wide.--grant <list>—slot:read/slot:write; a bare slot means write,*
means all. Omitting `--grant` mints an unrestricted key.
--spend-cap <usd>— hard ceiling;0means the key cannot spend at all.keys revoke-all --kind function|manual|accountnarrows the kill switch.
Agents working for one org: use an org-locked key. The org is otherwise ambient — a saved default that survives across turns, where a stale one looks exactly like a correct one. That is how a demo lands on a live site. Locking turns a wrong-org write into a 403. Keep your own key account-wide though: an org-locked one cannot create orgs or manage billing.
Every command that resolves an org says so on stderr — always, not only on change, so no line means no org was resolved:
myapi: org=7f1aa7f1-f6eb-4a6d-87b7-1bbe6584f5d6 name="Acme" [changed_from=…]
Stable key=value, full id, stderr only so --json | jq is untouched. Assert on it — object --json responses also carry _resolved, but arrays cannot.
Displacing writes refuse an inherited default. funnel push, domain assign and container domain require --org in non-interactive runs, the same shape as --yes. A key that reaches one org is exempt — there is no wrong org for it to reach.
Org profile fields
myapi org create <name> also takes --tagline, --description, --business-sector and --logo-url. They populate the org's public profile and the funnel created alongside it.
HTTP (from deployed code)
<!-- http:start --> <!-- generated by npm run canonical-sync — do not edit -->
base https://api.myapihq.compath GET /hq/orgs/{org_id}auth Authorization: Bearer <key> (fn: env.__MYAPI_KEY · container: env.MYAPI_KEY)reply { "success": true, "data": …, "error": null, "meta": {…} }
- Per-slot host — do not assume one host serves every slot.
- Org id goes in the PATH — there is no
X-Org-Idheader.
<!-- http:end -->
Run myapi --help or myapi <command> --help for full flag reference.