Agent Onboarding API
The Agent Onboarding API lets AI agents sign up users, handle plan selection and payment, and receive an API token — all without the user opening a dashboard. This is designed for Claude Code, Cursor, and any agent that wants to onboard users programmatically.
Base URL:
https://app.humblytics.com
Overview
Use Activate with an email below. The older flow that follows (agent-initiate) still works.
The older signup flow has two parts:
The agent calls
/api/v1/auth/agent-initiateto create a session and get a unique verification URL.The user opens that URL in their browser to verify identity and complete payment.
The agent polls until the session is complete, then receives an
authTokenfor all subsequent API calls.
Recommended · Activate with an email
The default way for an agent with no Humblytics credentials to get a key. The agent sends the person's email and site plus a short proof of work. Humblytics emails the person one Activate button. That click creates the account (Free start: 5,000 data points, 1 site, no card) or uses the existing one (without signing the browser in), adds the site, attaches a homepage audit if one was sent, and releases an account API key to the agent's poll. There is no sign-in page and no email code.
1 · Get a challenge
GET /api/v1/agent/activate/challenge
email
Yes
The person's email
url
Yes
Their site, as a domain (mysite.com) or a URL
The challenge is bound to that email and site and is valid for 10 minutes. 400 invalid_email or 400 invalid_url when a parameter is unusable.
2 · Solve the proof of work
Find a whole number counter (0, 1, 2, …) where SHA-256 of the text <nonce>|<counter> starts with difficulty zero bits. It takes a few seconds.
3 · Send the activation request
POST /api/v1/agent/activate
email, url
Yes
The same values the challenge was made for
nonce, timestamp, signature
Yes
From the challenge, unchanged
counter
Yes
The solved counter (number or decimal string)
agent_name
No
Your name as the person should see it, e.g. Claude Code
name
No
The person's name, used for a new account
audit_token
No
An hbt_ token from the Humblytics homepage audit; the audit and its drafted tests are saved to the site
Every valid proof gets this same answer, whether the email is new, already has an account, or has hit its daily limit, so the response never reveals who has an account. Only a wrong, expired or reused proof answers 400 INVALID_PROOF_OF_WORK: get a new challenge and solve it again.
4 · The person clicks Activate
Tell the person to check their inbox for the email from Humblytics and click Activate. Opening the link shows a confirm page; only the button activates, so email link scanners can't use it up. The link lasts 24 hours.
5 · Poll for the key
GET <poll_url> every 3 to 5 seconds.
apiKey is returned once, on the first approved answer; later polls answer approved without it. propertyId is null (with siteLimitReached: true) when the account already has its 1 Free start site. expired means the link timed out or a newer request for the same email and site replaced it.
Notes
The key is an account-level key with the same permissions as other agent keys. Launching a split test still needs the person's approval.
Use the key with the MCP server
https://mcp.humblytics.com/v1(Authorization: Bearer <apiKey>), then follow agent.md from Step 2.Limits: one live link per email and site (a new request replaces the old link), and daily caps per email and per IP. Nothing is created and no tracking runs until the click.
The endpoint is also listed as
agent_activation_endpointinhttps://app.humblytics.com/.well-known/oauth-authorization-server.
Step 1 · Initiate Signup
Create a signup session for a new user.
Request
Parameters
email
string
Yes
User's email address
name
string
Yes
User's full name
Response (201)
Error Responses
409
{ "error": "user_exists" }
Email already has an account
400
{ "error": "invalid_email" }
Email format is invalid
Step 2 · User Verification
Tell the user to open the verification URL in their browser. The page will:
Silently verify the user is human
Create their Humblytics account and set a browser session
Ask them to choose Business Monthly ($79/mo) or Business Annual ($65/mo, save $168/yr)
Redirect to Stripe to complete payment
Show a confirmation page
Step 3 · Poll for Completion
Poll every 3–5 seconds until status is "complete" or the session expires.
Request
While waiting
When complete
Error Responses
404
Token not found
410
Session expired — ask the user to start over
Step 4 · Use the Token
All subsequent API calls use the token as a Bearer header:
This token works with all Humblytics API endpoints including the External Analytics API and Split Testing API.
Step 5 · Add a Website
With the token, the agent can immediately add a website to the account.
Request
Response
Install the tracking script on the user's site:
Step 6 · Stripe Payment Links (Fallback)
If the user skipped payment during signup, send them directly to Stripe:
Monthly
https://buy.stripe.com/6oU9AS4TVdaQafZ9tS2Nq0k?prefilled_email=<email>
Annual
https://buy.stripe.com/8x2cN40DF4EkafZ49y2Nq0j?prefilled_email=<email>
Quick Reference
Activation challenge
GET
/api/v1/agent/activate/challenge?email=&url=
Activate with an email
POST
/api/v1/agent/activate
Poll for the key
GET
/api/v1/agent/activate/poll/<poll_token>
Initiate signup (older)
POST
/api/v1/auth/agent-initiate
Poll for completion
GET
/api/v1/auth/agent-signup-status?token=<token>
Add a website
POST
/api/v1/add-custom-site
List websites
GET
/api/v1/property/all
Billing status
GET
/api/v1/billing/status
Agent Spec File
The full onboarding spec is available as a standalone markdown file that agents can load as context:
https://app.humblytics.com/agent.md
You can also open it directly in your editor:
Cursor: Add to Cursor — opens Cursor and creates a rule from the spec
Claude Code: Run
curl -o HUMBLYTICS.md https://app.humblytics.com/agent.mdthen include in your CLAUDE.md
Add it to your CLAUDE.md, .cursorrules, or system prompt and your agent will know how to onboard users automatically.
Related
API Access & Agent Setup — guided activation flow for API keys and marketing skills in the dashboard
External Analytics API — Query traffic, pages, clicks, forms, and funnels
Split Testing API — Create and manage A/B tests programmatically
Last updated