Skip to Content
Browse the Docs▾

Get setup status

GET/api/v1/setup

Where a new account is in setup (website, researching, review, payment, start or done) and the exact next step. Works before the account has paid.

The customer's own AI agent sets a new account up with the setup routes: give Revnu the website, confirm what research found, open checkout, then start. This call says where the account is and what to do next. The recipe agents follow is at revnu.com/setup.md.

curl -H "Authorization: Bearer $REVNU_API_TOKEN" https://revnu.com/api/v1/setup

Response

{ "setup": { "stage": "review", "next": "Show the customer what Revnu understood…", "account": { "name": "Acme", "website": "https://acme.com" }, "dashboardUrl": "https://revnu.com/dashboard", "review": { "businessName": "Acme", "researchFailed": false, "rows": [{ "id": "sells", "kind": "fact", "label": "What You Sell", "found": "Invoicing for agencies", "sources": ["https://acme.com"], "required": true }] } } }

stage is one of website, researching, review, payment, start and done. Every stage carries next, the step to take in words. Follow it.

Stage Extra fields Next step
website none POST /setup/website
researching research: the current step, findings so far, startedAt Poll again in about 20 seconds
review review: businessName, researchFailed, and rows of { id, kind, label, question?, found, sources, required } Show the customer every row, then POST /setup/confirm
payment payment: priceUsdPerMonth, trialDays, freeMonths, cardAtCheckout, status POST /setup/checkout, then poll until start
start payment: status, trialEndsAt POST /setup/finish
done payment: status Nothing; Revnu is working

Offers differ by account, so read payment before telling the customer what checkout means: trialDays is the free period (0 for none), freeMonths covers invite offers with free months, and cardAtCheckout says whether Stripe's page asks for a card. An account with a YC deal has no payment at the payment stage; next sends the customer to the dashboard to add a card. When research failed, review.researchFailed is true and a corrected address can go to POST /setup/website again.

The CLI runs this whole flow: npx @revnu/cli setup --json. See Install the CLI.

Frequently Asked Questions

Which scope does this need?

None. Any token on the account can read its setup, including one approved before the account has paid. Until the first subscription, every route except /me and the setup routes answers 402 with error: "setup_pending".

How does an AI agent create the account?

It doesn't need a token first. The customer signs in on Revnu's page, which creates the account, either by connecting the MCP server or through npx @revnu/cli setup. The token that sign-in mints reaches these setup routes straight away.

Can the agent tell the customer how long the trial is?

Only from payment. Trial length depends on the customer's offer, from none to free months, so read trialDays, freeMonths and cardAtCheckout rather than assuming one.