Upnatus

The Upnatus REST API.

Every Upnatus operation over HTTP and JSON: tracking, rankings, AI answers, research, keywords, reports, the advisor. The MCP tools and the CLI run the same operations.

Signing in needs an account with access. A person requests access at upnatus.com/access; an agent cannot request it. Once access is granted, the person signs in at upnatus.com/app, and from there connects agents and creates API keys.

On this pageBase URL and contractAuthenticationFirst runFirst callsTwo-step callsIdempotencyRate limitsCreditsErrors

Base URL and contract

Base URLhttps://api.upnatus.com/v1
ContractOpenAPI 3.1 at https://api.upnatus.com/openapi.json. It lists paths from /v1 and has no servers entry, so set the host https://api.upnatus.com yourself.
FormatJSON in and out; a body is at most 1 MB. Path ids are UUIDs. Every success answers 200.
StatusGET /v1/status needs no sign-in and answers {"status":"ok","time":…}.

The OpenAPI file has more operations than the 126 MCP tools. The others are for a signed-in person in the panel (an API key gets 403 G-HUMAN with the address) or need no sign-in, such as POST /v1/preview. It declares only the main answers of each route; the full list of statuses and codes is under Errors.

Authentication

Send Authorization: Bearer <token> on every call. The token is an API key from Settings → Agents in the panel (the panel calls it a token; it starts with upn_live_; read is always on, ask is on by default, propose is optional), or an OAuth access token. A session cookie is not accepted. Scopes, roles and the rules of keys are on the MCP page.

Without a valid token the API answers 401 unauthenticated (or invalid_token, with WWW-Authenticate). A key of the other region answers 421 wrong_region. A call your scopes do not allow answers 403 G-SCOPE with the missing scope.

First run

  1. 1Find the business Call list_clients (GET /v1/clients). Each business has the id that the other tools take as client_id.
  2. 2Check what is missing Call get_setup_status with that client_id (GET /v1/setup-status?client_id=…). ready: true means every step is done.
  3. 3Give a person the next step When next_action is set, give its url and why to the person: only a person pays, connects an account or approves. Then call get_setup_status again after poll_after_s seconds (30) until that step is done. A wait kind means nobody has a step: tell the person it is not open yet and do not poll.
  4. 4Fill the profile yourself For each name in missing_profile, ask the person or read it from the business, then send it with set_profile (scope propose).
Your businesses
curl https://api.upnatus.com/v1/clients \
  -H "Authorization: Bearer $UPNATUS_API_KEY"
What is missing for one of them
curl "https://api.upnatus.com/v1/setup-status?client_id=$CLIENT_ID" \
  -H "Authorization: Bearer $UPNATUS_API_KEY"
get_setup_status: a business with no plan yet
{
  "client_id": "3f0c…",
  "ready": false,
  "steps": [
    { "step": "identity", "done": true },
    { "step": "payment",  "done": false },
    { "step": "oauth",    "done": true },
    { "step": "profile",  "done": false },
    { "step": "approval", "done": true }
  ],
  "missing_profile": ["monthly_budget", "lead_response_channel"],
  "waiting_approvals": 0,
  "next_action": {
    "kind": "payment",
    "url": "https://upnatus.com/app/…/billing",
    "why": "Upnatus needs a plan. A person starts it on the billing page.",
    "resume": "get_setup_status",
    "poll_after_s": 30
  }
}
StepDone whenIf not done
identityA person signed in and the organization has a business.With no business, client_id is null and next_action.url is the start page, where a person adds a website (see "No business yet").
paymentThe organization has an active paid plan, its trial included: Starter, Pro (the SEO and GEO plans), or a plan with ads.next_action.kind is payment: give the billing address to the person.
oauthAn ad account is connected. On a plan without ads it is done by itself.next_action.kind is oauth: a person connects the account on that page.
profileThe five facts are set: country, service area, business model, monthly budget, lead channel.Never a next_action. The agent fills the names in missing_profile with set_profile.
approvalNo change waits for a person.next_action.kind is approval: waiting_approvals changes wait on that page.

No business yet.

A key or a sign-in can reach no business yet: list_clients answers {"clients": []} and get_setup_status answers client_id: null with a next_action to the start page. Two ways forward:

  • Give the person the next_action.url. They add the website there and take the free scan.
  • Or start the free scan yourself with POST /v1/preview and the body {"domain": "example.com"}. Send it without an Authorization header (a signed-in call answers G-HUMAN) and with an Idempotency-Key. It is a REST call only, not an MCP tool, and it counts 30 a minute per address. The answer is {scan_id, ready, claim_url, next_action}: give claim_url to the person. They sign in, the business joins their organization, and list_clients shows it.
Start the free scan (no Authorization header)
curl -X POST https://api.upnatus.com/v1/preview \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"domain":"example.com"}'

First calls

Set UPNATUS_API_KEY and CLIENT_ID (an id from /v1/clients) first.

Is it up?
curl https://api.upnatus.com/v1/status
Rankings, last 8 weeks
curl "https://api.upnatus.com/v1/clients/$CLIENT_ID/rank-history?weeks=8" \
  -H "Authorization: Bearer $UPNATUS_API_KEY"
AI visibility
curl https://api.upnatus.com/v1/clients/$CLIENT_ID/ai-visibility \
  -H "Authorization: Bearer $UPNATUS_API_KEY"
Price of a paid call
curl "https://api.upnatus.com/v1/clients/$CLIENT_ID/spend-estimate?tool=get_domain_overview" \
  -H "Authorization: Bearer $UPNATUS_API_KEY"

More routes: GET /v1/clients/{client_id}/tracking, /today, /site-audit, /local-grid, /ai-answers, /ai-referrals, /search-performance, /site-traffic, and GET /v1/credits. Every route, with its parameters and answer, is in the OpenAPI file.

Two-step calls

Three paid calls start work and answer at once; a free GET gives the result. Poll the GET; do not send the POST again.

Tool (step 1)Step 1 answersRead the result with (step 2)When
seed_keyword_ideas · POST /v1/clients/{client_id}/keyword-ideas/seed{run_id, credits, market}. run_id: null with reused when the same phrases in the same market were asked in the last 30 days: nothing is charged and the stored result is the answer.get_keyword_research · GET /v1/clients/{client_id}/keyword-research?seeds=… (the same phrases, comma separated, and the same country, language, location_code). selected is null until the result is stored; then selected.tabs holds one list per phrase.A few seconds. Poll every 5 seconds, at most for 2 minutes.
ask_keyword_top10 · POST /v1/clients/{client_id}/keyword-top10{run_id, credits, market}, or reused as above.get_keyword_top10 · GET /v1/clients/{client_id}/keyword-top10?keyword=… (same market). found: false until it is stored; then rows holds the ten results and you_position the business.A few seconds. Poll every 5 seconds, at most for 2 minutes.
recheck_keywords · POST /v1/clients/{client_id}/keyword-recheck{run_id, credits, keywords, ready_in_minutes: {from: 45, to: 60}}. Each keyword must be a followed search spelled as in list_tracking, or the call answers 400 not_followed.get_rank_history · GET /v1/clients/{client_id}/rank-history?keyword=…&granularity=day&days=7. The new place shows as today’s point. No call shows progress.About 45 to 60 minutes. Read again after 45 minutes, then every 15 minutes. Do not send it again: a second call is a second job and is charged again.
Keyword ideas, step 1 (a write: needs an Idempotency-Key and max_credits)
curl -X POST https://api.upnatus.com/v1/clients/$CLIENT_ID/keyword-ideas/seed \
  -H "Authorization: Bearer $UPNATUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"seeds":["emergency plumber"],"max_credits":12}'
# {"run_id":"…","credits":12,"market":{"country":"US","location_code":null,"language":"en"}}
Keyword ideas, step 2: poll until "selected" is not null
curl "https://api.upnatus.com/v1/clients/$CLIENT_ID/keyword-research?seeds=emergency%20plumber&country=US&language=en" \
  -H "Authorization: Bearer $UPNATUS_API_KEY"
# {"searches":[…],"selected":{"id":"…","tabs":[{"seed":"emergency plumber","count":200,"rows":[…]}]},"price":{…}}
Check now, step 1: two followed searches, 3 credits each
curl -X POST https://api.upnatus.com/v1/clients/$CLIENT_ID/keyword-recheck \
  -H "Authorization: Bearer $UPNATUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"keywords":["emergency plumber","water heater repair"],"max_credits":6}'
# {"run_id":"…","credits":6,"keywords":2,"ready_in_minutes":{"from":45,"to":60}}
Check now, step 2: after 45 minutes, read today’s point
curl "https://api.upnatus.com/v1/clients/$CLIENT_ID/rank-history?keyword=emergency%20plumber&granularity=day&days=7" \
  -H "Authorization: Bearer $UPNATUS_API_KEY"

Following a run. Every run_id above, and the one send_chat_message returns, can be followed live: GET /v1/runs/{run_id}/events is a server-sent event stream (Accept: text/event-stream, same Bearer key). Events are run.progress, run.partial, run.deferred, run.done and run.failed; it ends after run.done or run.failed. After a drop, send the last event id as Last-Event-ID to resume. It answers 404 for a run of another organization. Polling the free GET is enough when you do not need the steps.

The top 10 works the same way: POST /v1/clients/{client_id}/keyword-top10 with {"keyword":"…","max_credits":1}, then GET /v1/clients/{client_id}/keyword-top10?keyword=… until found is true.

Idempotency

  • Every call that writes needs an Idempotency-Key header, 1 to 255 characters. Without it the API answers 422 idempotency_key_required; a longer one answers 422 idempotency_key_invalid.
  • The same key with the same body returns the stored answer, with the header Idempotent-Replayed: true, and does the work once. A repeated paid call is not charged again.
  • The same key with a different body answers 422 idempotency_key_reused.
  • Keys are kept for 7 days, per caller (API key, OAuth sign-in or person) and per operation: two callers that send the same value never see each other’s answer.
  • Make one key per piece of work and keep it until you have an answer. A new key on a retry is a new call.
  • A few answers can be shown only once (a new API key, for example). Their replay answers 409 shown_once: send a new key.
  • Reads need no key. A research read that spends credits (domain overview, Maps search, branch search, backlinks, AI mentions, brand mentions) takes an optional one: send the same key again after a timeout and the stored answer comes back without a second charge. Without a key each call is a new read. The CLI sends one made from the request.

Rate limits

Kind of callLimit
Read300 a minute
Write60 a minute
Ask (the advisor and paid research)30 a minute
Calls with no sign-in (/v1/preview, /v1/status)30 a minute per address
Sign-in routes20 a minute per address
Whole organization, all kinds900 a minute

The limits count per key, OAuth sign-in or person, in fixed one-minute windows, and MCP shares them. Over a limit the API answers 429 rate_limited with the headers Retry-After, RateLimit-Limit, RateLimit-Remaining (always 0) and RateLimit-Reset. The headers come only on that answer. Wait the seconds Retry-After says, then send the same call again.

429 codeWhat it isWhat to do
rate_limitedToo many calls this minute.Wait Retry-After seconds and retry. The only 429 to retry.
budget_capThe business used its research data for the month. Nothing was charged.Do not retry. Tell the person; it opens again when the month turns, or with a bigger plan.
quotaThe advisor’s answers for the month are used (Starter 100, Pro 200). The message gives the date they come back (UTC) and next_action the billing page.Do not retry. Tell the person; it opens again next month, or with a bigger plan.
trial_ask_quotaThe questions of the trial are used, or the trial ended.Do not retry. A person starts the plan (get_setup_status gives the address).

Credits

Tracking comes with the plan and spends no credits: on the current plans rankings and AI questions are checked every 3 days (older plans differ; GET /v1/clients/{client_id}/tracking returns the interval in limits), the site is scanned every week, and the local grid gets up to 450 checks a week (900 with the grid add-on). Research outside that schedule spends credits from the plan’s monthly credits or a top-up. Plans and top-ups are on the pricing page.

Every tool that spends credits, and the advisor, needs an active paid plan on the organization (Starter, Pro, or a plan with ads; a trial counts). Without one the call answers 402 G-ENTITLEMENT before any price check, on every tool and every route, with missing: ["seo.weekly"] (or ask.generate for the advisor and the memory) and a payment next_action. Sending max_credits does not help. Give the person the next_action.url, or call get_setup_status for it.

CallCredits
Check now (recheck_keywords, POST /v1/clients/{client_id}/keyword-recheck)3 a search
Keyword ideas (seed_keyword_ideas)1, or 2 with a city
Top 10, domain overview, backlinks, Maps search, branch search1 each
Search suggestions, page check1 each
Related keywords, link history3 each
Backlink anchors6
Rank history of a site (12 months)14
Numbers for saved keywords (up to 500)1
An advisor answer (send_chat_message)1

A key or an agent must send max_credits, the most it accepts. Without it, or with less than the price, nothing is spent and the API answers 402 G-COST. GET /v1/clients/{client_id}/spend-estimate?tool=… gives the price first, and GET /v1/credits gives the balance. A paid read also answers balance, the credits left after the charge. Over REST and the CLI, with_city, seed_count and keyword_count cannot be sent yet: a query sends them as text and the call answers 422 invalid_input. Leave them out and work the price out from the table (Check now: 3 × the searches; ideas in a city: 2). Over MCP both work. Research that finds nothing is not charged. The same question asked again within 30 days is answered from storage and not charged; send ask_again: true for a fresh read.

G-COST, cap missing or too low: resend with max_credits
{
  "guard": "G-COST",
  "message": "recheck_keywords costs 6 credits. Nothing was spent. Balance: 1200. Send max_credits: 6 or more to go ahead.",
  "missing": ["max_credits"],
  "next_action": { "kind": "approval", "url": "https://upnatus.com/app/…/billing", "why": "Ask the person if this may spend 6 credits. If yes, send the call again with max_credits: 6 or more." }
}
G-COST, balance too small: a person adds credits
{
  "guard": "G-COST",
  "message": "This needs 6 credits and 2 are available.",
  "missing": ["credits"],
  "next_action": { "kind": "payment", "url": "https://upnatus.com/app/…/billing", "why": "Add credits to continue." }
}
missingWhat it meansWhat to do
max_creditsThe call has no max_credits, or less than the price. Nothing was spent.Show the person the price, then send the call again with max_credits at or above it.
creditsThe organization has fewer credits than the price.Give next_action.url to the person. Do not retry until they add credits.
key_credit_capThis API key would pass its monthly credit cap (set by a person when the key was made; 50 by default, 0 means the key cannot spend). The cap starts again on the 1st of the month (UTC).Give next_action.url (Settings → Agents) to the person: only a person can make a key with a higher cap. Do not retry until then. OAuth sign-ins have no such cap.

Errors

Under /v1 and /mcp every error has the same fields: code, message, missing and next_action, next to the HTTP status. A guard adds guard; any other error adds error with a request_id. The panel’s /auth routes and the OAuth routes under /oauth keep their own shapes.

1. A rule said no (a guard)
{
  "guard": "G-COST",
  "code": "G-COST",
  "message": "get_domain_overview costs 7 credits. Nothing was spent. …",
  "missing": ["max_credits"],
  "next_action": null
}
2. Anything else under /v1
{
  "error": { "code": "invalid_input", "message": "…", "request_id": "…" },
  "code": "invalid_input",
  "message": "…",
  "missing": [],
  "next_action": null
}
3. Sign-in routes under /auth (the panel’s)
{ "message": "…", "code": "…" }
4. OAuth routes under /oauth (RFC 6749)
{ "error": "invalid_grant", "error_description": "…" }
  1. 1It has "code". A /v1 or /mcp body. Branch on code, then on missing. Follow next_action when it is set.
  2. 2It also has "guard". A rule said no. guard equals code; a guard may add who_can.
  3. 3Its "error" is an object. Any other error. error.code repeats code; quote error.request_id if you contact us.
  4. 4Its "error" is a string. An OAuth error: read error_description.
  5. 5It has only "message" and "code". A sign-in route error, for the panel.
StatusBodyCodes you will seeWhat to do
400errorinvalid_json, not_followed, invalid_market, invalid_engines, over_limit, too_many_new, unknown_keywordFix the request. not_followed: send searches spelled as in list_tracking.
401errorunauthenticated, invalid_tokenSend a valid key or token; renew an OAuth token with its refresh token.
402guard or errorG-COST; G-ENTITLEMENTSee Credits: missing says whether to ask the person for a max_credits at or above the price, a person adds credits, or a person starts a plan (G-ENTITLEMENT, the one answer for no paid plan).
403guard or errorG-SCOPE, G-ROLE, G-HUMAN, G-STEPUP, G-ENTITLEMENT (a plan without that feature), G-BILLING_TEAM; org_required, person_only, origin_not_allowed, identity_not_allowedGuards: see the table below. person_only: only a signed-in person can do it. org_required: the credential has no organization.
404errornot_foundThe id is wrong, or outside what this key reaches (the same answer for both).
409guard or errorG-CONN, G-CONNECTION, G-PROFILE, G-STATE, G-STALE and other guards; key_limit, monthly_limit, pending_recheck, shown_once, busy, not_ready, limit_reached, already_trackedRead message. monthly_limit: wait for the month to turn. pending_recheck, busy, not_ready: wait a minute and try again. shown_once: use a new Idempotency-Key.
410errorinvite_expired, consent_expired, code_expired, transfer_expiredThe link or code ended. Start the step again.
413errorpayload_too_largeSend a body under 1 MB.
421errorwrong_regionThe key belongs to the other region. Use a key made in this region.
422error or guardinvalid_input, idempotency_key_required, idempotency_key_invalid, idempotency_key_reused, unknown_country, unknown_city, rejected_by_source, too_many_lines; G-CONSENT, G-ACCOUNTFix the request. message names the field. A tool takes only the arguments it lists: an argument it does not have is refused, and the message lists the valid ones. A null for an optional argument means "not given". A text with a control character (such as NUL) is refused.
429errorrate_limited; budget_cap, quota, trial_ask_quota, invite_limitRetry only rate_limited, after Retry-After. The others are monthly limits: see Rate limits.
500errorinternalTry once more with the same Idempotency-Key; quote the request_id if you contact us.
502errorsource_unavailable, platform_refusedA data source or ad platform did not answer. Nothing was charged. Try again in a minute.
503errorresearch_unavailable, credits_unavailable, ai_closed, platform_unavailableThat part is closed for now. Nothing was charged. Try again later.
GuardStatusWhat it means and what to do
G-SCOPE403The key or sign-in lacks the scope in missing. A person makes a key with that scope, or signs the agent in again with it.
G-ROLE403The role is too low; who_can lists the roles that may. A person with that role does it.
G-HUMAN403Only a signed-in person can do this. Give next_action.url to the person.
G-STEPUP403The person must confirm it is them, in the panel.
G-BILLING_TEAM403Only the people who handle billing can do this.
G-ENTITLEMENT402 or 403No paid plan (402, next_action opens Billing), or a plan that does not include the feature (403). missing names what (for example seo.weekly). A person starts or changes the plan. While ad features are closed, an ad tool answers 403 with missing: ["ads.open"] and a wait next_action.
G-COST402missing: ["max_credits"]: ask the person, then resend with a cap at or above the price (next_action says so). ["credits"]: a person adds credits. ["key_credit_cap"]: the API key spent its credits for the month; a person makes a key with a higher monthly cap.
G-CONN, G-CONNECTION409No connected account for this. A person connects one (next_action kind oauth when set).
G-PROFILE409Profile facts are missing; send the names in missing with set_profile.
G-STATE, G-STALE409The thing changed or is not in a state that allows this. Read it again, then decide.
Other guards (G-POLICY, G-AUTO, G-PREFLIGHT, G-ASSET, G-UNIT, G-UNIQUE, G-LIMIT, G-QUEUE, G-ACK, G-CONSENT, G-ACCOUNT …)409 unless shownMostly ads and Autopilot checks. message says why. Change the request or ask the person; do not send it again unchanged.

next_action is {kind, url, why, resume?, poll_after_s?}. kind is one of identity (a person signs in or adds a business), payment (a plan or credits), oauth (connect an account) and approval (approve or decline changes) and wait (nothing to do now: the url says why, for example that ad features are not open yet). Give url and why to the person. When resume is set (always get_setup_status), call that operation again after poll_after_s seconds to see whether the step is done. A guard may also carry who_can, the roles that may do it.

Read next.

Take one of the first seats.

The closed beta is free for a small first group of agencies, businesses and app teams. We onboard each one by hand.