Skip to main content
Private preview Working end to end for the accounts that use it; details can still change. Tell us at contact@agentaos.ai before you rely on it, and we support you directly. See Product release phases.
agentaos.businesses is for platforms: the businesses you manage, whether a client’s business or another app of your own company. Every method acts on your own account, the platform. Call businesses.* on your platform client. A client made with { business } acts as that business, and a business manages no businesses of its own. To do anything as one of the businesses, see Acting for a business.

businesses.list()

Returns Business[]: every business you manage. Not paginated.

businesses.retrieve(id)

string
required
The business id.
Returns one Business, the same shape as a row of list().

businesses.create(params)

string
required
The name buyers see. A brand, not an email. Up to 100 characters.
string
required
Where the business is registered, ISO 3166-1 alpha-2 in upper case, e.g. 'DE'.
string
Invite your client as the business’s admin. Leave it out to run the business yourself. Only an owner of your platform may invite.
true for another app of your own company: verified and priced with you, with no share and no identity check of its own.
boolean
default:"true"
false: we send no email. You send inviteUrl to your client yourself (white-label).
The business starts in test mode and goes live after its own verification. Store business.id next to your own record of the client.
Business
The new business.
string | null
The invitation token, or null without clientEmail.
string | null
The link your client opens to accept, or null without clientEmail. Ready to send as it is. The invitation expires after 7 days.

businesses.resendInvitation(id, params?)

Sends the invitation again, to the person last invited. It is a new link: the old one stops working. The new invitation expires after 7 days.
string
required
The business id.
boolean
default:"true"
false: no email, you send the link yourself.
string
The new invitation token.
string
The new link to send.
Once your client has joined, the invitation is theirs to manage: this returns 409 client_joined.

businesses.revokeInvitation(id)

string
required
The business id.
Withdraws the open invitation. Its link stops working. Returns nothing. 409 client_joined once your client has joined.
The identity check link for your client. You send it; only your client can complete it.
string
required
The business id.
string | null
The link to send. null when the client is already verified: nothing to send.
string
Where the identity check stands. These are the check’s own states, not a business status: Not Started, In Progress, Awaiting User, In Review, Approved, Declined, Resubmitted, Expired, Kyc Expired or Abandoned. Approved means the check is done.
Needs a live key (sk_live_...). A test key gets 403 live_key_required. The CLI signed in with agenta login, and the ID check link button in the dashboard, work in test mode too. For another app of your own company it returns 409 identity_from_company: its identity check is your company’s.
Calling it again while a check is open gives back the same check.

Business fields

string
Business UUID. Use it as { business } and in AgentaOS-Account.
string
The name buyers see.
string | null
ISO 3166-1 alpha-2.
'test_only' | 'in_review' | 'changes_needed' | 'on_hold' | 'rejected' | 'live'
Where the business stands. live means verified and with a payout account. changes_needed means we asked the business for a change. See Business status.
string
Your own id: the platform that manages it.
string
ISO 8601.
{ bps: number; fixedMinor: number }
Your share of its new sales: basis points of the price before VAT (1000 = 10%) plus a fixed amount in minor units. Set in the dashboard. See Platform fees.
true for another app of your own company.
Array<{ currency: string; feesMinor: number; feesDisplay: string }>
Your share of its live sales this month, per currency. feesDisplay is ready to show, e.g. "€12.50".
string | null
Who an open invitation is waiting on, or null.
boolean
The identity check is done: its own, or your company’s for another app of your own company.

Business status

The dashboard, the status field and the account.updated event name the same states with different words: A business is live when it is verified and has a payout account saved. Until it has a payout account, a verified business shows Test only (test_only), and verification is already verified.

Acting for a business

Any call on any resource can run as a business you manage. For a whole client, pass business when you create it. Every request it sends acts as that business:
For one call, pass { business } as the last argument of any method. It overrides the client’s business:
Either way the SDK sends the id in the AgentaOS-Account header. Leave it out to act as yourself. A business you do not manage returns 403 You cannot act as this business., the same answer for an id that does not exist.
Filing a client’s verification with accountReview.submit(…, { business }) is recorded as filed by the platform. Only your client can complete the identity check: send them the link from createVerificationLink.

File a client’s verification

This is the same verification any account submits, sent as the business.
We record it as filed by the platform, and our reviewers see that. File only what your client confirmed to you.
See Account review for what we check.

One webhook for every business

You need no webhook per client. Your own endpoint receives every event of every business you manage, signed with your own secret. Each event carries business, the id of the business it happened in.
account.updated fires when the client’s verification changes. Set your endpoint in Settings → Developers → Webhooks. See Platform webhooks.

Next steps

Build a platform

End to end.

Businesses (CLI)

The same from the terminal.

Platform webhooks

business on every event, and account.updated.

API reference

The raw HTTP endpoints.