REST API
The same functions as the MCP tools over plain HTTP, every route with the tool it matches.
The base URL is https://api.402lounge.com/v1. Bodies are JSON objects, answers are JSON. Each route does what its tool does, with the same fields, so the MCP tools describe the inputs.
Proving who you are
Send Authorization: Bearer lg_... with a session token, or the SIGN-IN-WITH-X header of an x402 client. A body may also carry session_token or proof: {message, signature}. Without any of them a route that needs an account answers auth_required with a challenge. Accounts and sign-in explains each way.
X-Client names your client, like claude-code 2.1. It shows up in the agent's list of apps.
X-Company-Id names the company a call of a person is for, when their login is in several companies. Without it the API takes the company used last. Agents never need it, see one login, many companies.
Errors look the same as over MCP, with the HTTP status of Errors and limits. Browsers may only call the API from 402lounge.com and app.402lounge.com.
Start and account
GET /v1/requirements
- Tool
- lounge.requirements
- What it does
- Rules, prices, the current terms and the sentences you sign. No account
GET /v1/terms
- Tool
- lounge.terms
- What it does
- The current terms and privacy notice. No account
POST /v1/signup
- Tool
- lounge.signup
- What it does
- Create the account. Answers 402 with the challenge and, once open, a 0.001 USDC option
POST /v1/session
- Tool
- lounge.session
- What it does
- A new session token, by signature or by 0.001 USDC
GET /v1/me
- Tool
- lounge.me
- What it does
- You, your company and its wallets. For a person also memberships and company_selected. For a login of the app without a company, who you are and how to create one
PATCH /v1/me
- Tool
- lounge.agent.update
- What it does
- Your name inside the company
GET /v1/apps
- Tool
- lounge.apps
- What it does
- The clients you have used
POST /v1/apps/{client}/{action}
- Tool
- lounge.apps
- What it does
- deactivate, activate or disconnect a client
GET /v1/notices
- Tool
- lounge.notices
- What it does
- Your notices. ?all=1 includes the read ones
POST /v1/notices/{id}/ack
- Tool
- lounge.notices
- What it does
- Mark a notice as read
POST /v1/dashboard-link
- Tool
- lounge.dashboard.link
- What it does
- A one-time dashboard link for ten minutes
GET /v1/me/export
- Tool
- lounge.account.export
- What it does
- Everything we keep about the agent, as a JSON file
POST /v1/me/delete
- Tool
- lounge.account.delete
- What it does
- Schedule the deletion in 7 days, with a fresh signature
DELETE /v1/me/delete
- Tool
- lounge.account.delete
- What it does
- Cancel the deletion
Wallets
GET /v1/wallets
- Tool
- lounge.wallet.list
- What it does
- All wallets of the company. ?mine=1 for your own
POST /v1/wallets
- Tool
- lounge.wallet.add
- What it does
- Add a wallet. It signs wallet_proof or pays 0.001 USDC. The owner adds one in the app by its signature, with agent_id or null for none
PATCH /v1/wallets/{address}
- Tool
- company.wallet.label
- What it does
- Name a wallet, label: null clears it
DELETE /v1/wallets/{address}
- Tool
- lounge.wallet.remove
- What it does
- Remove a wallet, its receipts stay
POST /v1/wallets/{address}/primary
- Tool
- lounge.wallet.primary
- What it does
- The wallet you sign in with
POST /v1/wallets/{address}/assign
- Tool
- company.wallet.assign
- What it does
- Move a wallet to another agent, agent_id: null unassigns it
Receipts and the register
POST /v1/receipts
- Tool
- receipts.record
- What it does
- Report a payment you made
GET /v1/receipts
- Tool
- receipts.list
- What it does
- One month of receipts. ?month=2026-10&status=&agent_id=&wallet=&mine=1&limit=&before=, recent=1 for the newest of any month
GET /v1/receipts/{id}
- Tool
- receipts.get
- What it does
- One receipt by id or transaction hash
GET /v1/wallet-names
- Tool
- What it does
- Your company's names for wallets outside the register
PUT /v1/wallet-names/{address}
- Tool
- What it does
- Name a wallet you paid that no listing claims, {name}, 1 to 60 characters. Shows on your receipts as seller.your_name
DELETE /v1/wallet-names/{address}
- Tool
- What it does
- Forget that name
GET /v1/register/{address}
- Tool
- register.lookup
- What it does
- Who is behind a payTo wallet. No account
Directory and listings
GET /v1/listings
- Tool
- directory.search
- What it does
- The directory. `?q=&filter=all
- verified
- mcp&sort=level
- new
- name&limit=&offset=. A booked sponsored place comes in sponsored`. No account, cached for a minute
GET /v1/listings/{slug}
- Tool
- directory.get
- What it does
- One listing with its wallets, calls and prices, other networks and links. No account
POST /v1/listings/preview
- Tool
- directory.preview
- What it does
- Read the 402 answer of one paid URL and show the listing it would make. Body {url}
POST /v1/listings
- Tool
- directory.submit
- What it does
- List the service on level 0 under your company. Body {url, contact_email}. Admins and owners
POST /v1/listings/{slug}/claim
- Tool
- directory.claim
- What it does
- A wallet of the listing signs, the listing belongs to your company on level 1. Body {address, wallet_proof?}. Admins and owners
Plans and billing
GET /v1/billing
- Tool
- billing.get
- What it does
- Plan, period, end, status, limits, this month's usage, the one-time 20 %, archive, retention and pay_with
POST /v1/billing/checkout
- Tool
- billing.checkout
- What it does
- A Polar checkout for `{plan: "books"
- "teams", period: "month"
- "year"} or for the archive, {archive: "month"
- "year"}`. Admins, owners and finance
POST /v1/billing/portal
- Tool
- billing.portal
- What it does
- Polar's customer portal: payment method, invoices, change or cancel. Admins, owners and finance
GET /v1/sponsor
- Tool
- sponsor.get
- What it does
- Your sponsored places and whether the place is free
GET /v1/sponsor/ad
- Tool
- What it does
- ?listing=: the text of the listing's sponsored tile, or what it says without one, and the rules
PUT /v1/sponsor/ad
- Tool
- What it does
- {listing, title, body, url}: the title keeps the listing's name, the text up to 140 characters, the link on the listing's domain or a subdomain. Changeable while the place runs
POST /v1/sponsor/checkout
- Tool
- sponsor.checkout
- What it does
- A Polar checkout for one month of the sponsored place, {listing}, paid once. Admins and owners of the company the listing belongs to
POST /v1/billing/usdc/quote
- Tool
- billing.quote
- What it does
- An offer to pay in USDC: {plan, period}, {archive}, {sponsor} or {seller_check}. Price in EUR with VAT, the amount in USDC, pay_to and pay_url, open for 30 minutes. Admins, owners and finance (Paying 402lounge)
GET /v1/billing/usdc/quotes
- Tool
- No tool
- What it does
- The company's last 50 offers with their status
GET /v1/billing/usdc/quote/{id}
- Tool
- billing.quote
- What it does
- One offer: open, paid or expired, with the transaction and the invoice once paid
POST /v1/billing/usdc/pay/{id}
- Tool
- No tool
- What it does
- The offer's x402 route. Without payment 402 with the amount, with PAYMENT-SIGNATURE paid, answers with the invoice. No account
GET /v1/billing/invoices
- Tool
- billing.invoices
- What it does
- The invoices of 402lounge for payments in USDC, newest first
GET /v1/billing/invoices/{id}
- Tool
- billing.invoices
- What it does
- One invoice with its full content
GET /v1/billing/invoices/{id}/pdf
- Tool
- No tool
- What it does
- The invoice as PDF, ?lang=de for German, from the archive
POST /v1/webhooks/polar
- Tool
- No tool
- What it does
- Polar's events, signed after Standard Webhooks. Only for Polar
Company and people
GET /v1/company
- Tool
- company.get
- What it does
- Data, level, what is missing, agents and people
PATCH /v1/company
- Tool
- company.update
- What it does
- Fill in or change the company data, also currency, skr and own_accounts
GET /v1/currencies
- Tool
- What it does
- The currencies a company can see its amounts in: EUR, USD and every currency with an ECB reference rate. Public
POST /v1/company/vat-check
- Tool
- company.vat_check
- What it does
- Ask VIES again
POST /v1/company/email
- Tool
- company.email
- What it does
- Set the email and mail a code
POST /v1/company/email/confirm
- Tool
- company.email
- What it does
- Confirm the code
DELETE /v1/company/email
- Tool
- company.email
- What it does
- Remove the email, only without company data
PUT /v1/company/logo
- Tool
- What it does
- The logo as the request body: PNG, JPEG or WebP, up to 256 KB. Owner or admin agent
DELETE /v1/company/logo
- Tool
- What it does
- Remove the logo
GET /v1/logos/{company}/{file}
- Tool
- What it does
- The logo file, public. company.logo in GET /v1/company is its path
GET /v1/company/agents
- Tool
- company.agents
- What it does
- The agents with their wallets and this month's spending
PATCH /v1/company/agents/{id}
- Tool
- company.agent.update
- What it does
- Rename an agent or change its role
DELETE /v1/company/agents/{id}
- Tool
- company.agent.remove
- What it does
- Remove an agent in 7 days
GET /v1/company/sessions
- Tool
- What it does
- The open session tokens of every agent: client, wallet, since, until
DELETE /v1/company/agents/{id}/sessions
- Tool
- What it does
- End all session tokens of an agent. The agent itself, the owner or an admin agent
DELETE /v1/company/agents/{id}/sessions/{sid}
- Tool
- What it does
- End one of them
POST /v1/company/invite
- Tool
- company.invite
- What it does
- An invite code for seven days
POST /v1/company/join
- Tool
- company.join
- What it does
- Join a company with a code
GET /v1/company/members
- Tool
- company.members
- What it does
- The people in the company
POST /v1/company/members
- Tool
- company.members
- What it does
- Invite a person with a role
PATCH /v1/company/members/{id}
- Tool
- company.members
- What it does
- Change a person's role
DELETE /v1/company/members/{id}
- Tool
- company.members
- What it does
- Take a person out
GET /v1/company/roles
- Tool
- What it does
- The company's own roles, the fixed ones and the areas
POST /v1/company/roles
- Tool
- What it does
- {name, areas}: a role with none, read or write per area (receipts also export). Owner or admin agent
PATCH /v1/company/roles/{id}
- Tool
- What it does
- Rename it or change its areas
DELETE /v1/company/roles/{id}
- Tool
- What it does
- Delete a role nobody has
GET /v1/company/export
- Tool
- No tool
- What it does
- The company's books as one ZIP: every document as JSON and PDF, receipts.csv, documents.csv. Owner, admin, finance and adviser
POST /v1/company/close
- Tool
- company.close
- What it does
- Close the company in 30 days. Body {name} with the company name. With now: true, export_kept: true it closes at once and deletes receipts and documents. Owner and admin
DELETE /v1/company/close
- Tool
- company.close
- What it does
- Cancel the closing. Owner and admin
Board
Requests between the people and agents of a company, for example the tax adviser asking for a missing receipt. Whoever reads the receipts reads and writes here.
GET /v1/requests
- Tool
- company.requests
- What it does
- The requests, last active first. ?status=open (default), done or all, plus open, the number still open
POST /v1/requests
- Tool
- company.requests
- What it does
- {title, body?, month?, receipt_id?}: ask something. Mails the company email and everybody who exports or changes receipts
GET /v1/requests/{id}
- Tool
- company.requests
- What it does
- One request with its answers
POST /v1/requests/{id}/replies
- Tool
- company.requests
- What it does
- {body}: answer. Opens a done request again and mails everybody in the thread
PATCH /v1/requests/{id}
- Tool
- company.requests
- What it does
- {status: "done"} or "open"
DELETE /v1/requests/{id}
- Tool
- company.requests
- What it does
- Take it back. Who asked, the owner or an admin agent
Documents
GET /v1/invoices
- Tool
- invoices.list
- What it does
- The documents, newest first. ?month=2026-10&limit=
POST /v1/invoices/issue
- Tool
- invoices.issue
- What it does
- Issue the documents for a finished month. Owner, admin and finance
GET /v1/invoices/draft
- Tool
- invoices.draft
- What it does
- The month so far as drafts, one per seller. ?month=2026-11
GET /v1/invoices/draft/pdf
- Tool
- No tool
- What it does
- A draft as PDF. ?month=&seller=&lang=de
POST /v1/invoices/{id}/cancel
- Tool
- invoices.cancel
- What it does
- Cancel a document. Body {reason}. Owner, admin and finance
GET /v1/invoices/export
- Tool
- No tool
- What it does
- A finished month for the books: ?month=2026-10&format=csv (one line per document line) or format=datev (DATEV Buchungsstapel). From Books on. Owner, admin, finance and adviser. Monthly documents
GET /v1/invoices/{id}
- Tool
- invoices.get
- What it does
- One document as JSON
GET /v1/invoices/{id}/pdf
- Tool
- No tool
- What it does
- The archived PDF, English or ?lang=de, byte for byte as issued
GET /v1/invoices/{id}/xml
- Tool
- No tool
- What it does
- The e-invoice of an invoice or credit note (EN 16931, UN/CEFACT CII), as archived. Vouchers have none
Sellers
GET /v1/seller
- Tool
- seller.get
- What it does
- Your listings with their level, the company check, the seller profile, the mandate and self-billing
PATCH /v1/seller/profile
- Tool
- seller.profile
- What it does
- The person who acts for the company (representative_name, required for level 2), register court and number (optional, or no_register), sole_proprietor, show_name. Admins and owners
POST /v1/seller/checks
- Tool
- seller.check
- What it does
- Start the company check of a listing on level 1. Body {listing}. Admins and owners
GET /v1/seller/checks/{id}
- Tool
- seller.check
- What it does
- The check with its steps, the domain email and the DNS record as the other way
POST /v1/seller/checks/{id}/email
- Tool
- seller.check
- What it does
- Send a code to {email} at the domain of the listing. Admins and owners
POST /v1/seller/checks/{id}/email/confirm
- Tool
- seller.check
- What it does
- Confirm it with {code}, then the steps run again. Admins and owners
POST /v1/seller/checks/{id}/verify
- Tool
- seller.check
- What it does
- Run the steps again. Admins and owners
POST /v1/seller/checks/{id}/checkout
- Tool
- seller.check
- What it does
- A Polar checkout for one year of the check (10 €). Admins, owners and finance
DELETE /v1/seller/checks/{id}
- Tool
- seller.check
- What it does
- Withdraw a check that is open or in review
GET /v1/seller/mandate
- Tool
- seller.mandate
- What it does
- The invoicing mandate: text, version, sha256, statement, whether it is signed
POST /v1/seller/mandate
- Tool
- seller.mandate
- What it does
- Sign it. An admin agent: first the challenge, then {agreement_proof}. An owner in the app: {confirm: true}
DELETE /v1/seller/mandate
- Tool
- seller.mandate
- What it does
- Revoke it, in force until the end of the month
GET /v1/seller/self-billing
- Tool
- seller.self_billing
- What it does
- The self-billing agreement and whether it is signed
POST /v1/seller/self-billing
- Tool
- seller.self_billing
- What it does
- Agree to it, as the mandate
DELETE /v1/seller/self-billing
- Tool
- seller.self_billing
- What it does
- End it, in force until the end of the month
GET /v1/seller/invoices
- Tool
- seller.invoices
- What it does
- Invoices in your name, credit notes you received and their cancellations. ?month=&limit=
GET /v1/seller/invoices/{id}
- Tool
- seller.invoices
- What it does
- One of them as JSON
GET /v1/seller/invoices/{id}/pdf
- Tool
- No tool
- What it does
- Its PDF, English or ?lang=de
GET /v1/seller/invoices/{id}/xml
- Tool
- No tool
- What it does
- Its e-invoice
POST /v1/seller/invoices/{id}/cancel
- Tool
- seller.invoices.cancel
- What it does
- Cancel it with {reason}. Admins, owners and finance
For agents that read first
GET /llms.txt
- What it is
- Short instructions for agents on the API host
GET /skill.md
- What it is
- Sign-up and the first receipt as a skill file
GET /.well-known/x402
- What it is
- What is free and what costs 0.001 USDC, for x402 clients
GET /health
- What it is
- Whether the API is up
Used by the website
The website and the app call these. They are public, but not meant for agents.
POST /v1/auth/web3/challenge
- What it does
- A sign-in challenge for the dashboard
POST /v1/auth/web3/verify
- What it does
- Sign in to the dashboard with a wallet signature
POST /v1/auth/email/link
- What it does
- An email link into the app. For an address without a company it starts the sign-up
POST /v1/companies
- What it does
- A signed-in person creates a company and becomes its owner, also next to the companies they are in already. Body: the fields of PATCH /v1/company, name required, and accept: {terms, privacy, business: true}
POST /v1/me/terms
- What it does
- Accept the current terms in the app, {accept: true}, with all: true for every company of the person. For people, and for an agent signed in with its dashboard link
POST /v1/auth/sso
- What it does
- Whether a work address {email} signs in with SSO. Answers sso_not_available (501) while SSO is off
POST /v1/reports
- What it does
- Report a listing or an agent for illegal content or a breach of the terms
POST /v1/track
- What it does
- Count a view or a click on a listing page, without cookies
GET /v1/stats
- What it does
- Calls and lookups of the last days, as counts only
GET /v1/status
- What it does
- Each part of the service (indexer, fx, documents, api) as ok, degraded or down, with the incidents of the last 30 days. A minute old at most
GET /v1/blog
- What it does
- Published articles
GET /v1/blog/{slug}
- What it does
- One article
GET /v1/changelog
- What it does
- Published changelog entries