A vetted platform partner opens STACK accounts for its customers through the API. There is no consent screen, no checkout and nothing for the customer to do. The partner pays from its wallet and is STACK's customer. Being a partner is free: it needs no plan of its own. The account holds the partner's own reference for the customer, not the customer's email, so STACK holds no personal data about the end customer until the account is released to them.
The /v1/partner/* endpoints require a partner operator API key. STACK staff mark your account as a partner. Non-partner keys get 403. The full contract, with schemas and a conformance suite, is the Partner API specification, listed under Standards and protocols.
The life of an account: you open it, you may invite the customer to see it, and you may release it. A release mails the customer a link. They claim the account by starting the platform trial with a card and passing the sanctions check. Only then does the account move to them and your access end. If the claim does not complete, nothing moves. A person who already has a STACK account of their own is never touched: you open a separate account for them.
You are responsible for checking your own users until an account is released. STACK checks the partner at its own checkout, and checks the customer when they claim.
Open an account for a customer. The body is { "external_ref": "<your id for the customer>" }, 1 to 256 characters, unique per partner. It is the idempotency key: repeating the call returns the account that exists. The account is an isolated child operator with its own audit chain, signing key, agents, passports and webhooks. It has no human user. Its own platform plan is taken from your wallet: the first month when it opens (a wallet that cannot cover it returns 402 INSUFFICIENT_BALANCE and no account is opened). Hosted controls are off unless the body also has "controls": true, which switches them on as the account opens and takes their first month from your wallet with the plan's: a wallet that cannot cover both opens nothing.
curl -X POST https://api.getstack.run/v1/partner/accounts \
-H "Authorization: Bearer $STACK_PARTNER_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "external_ref": "cus_your_id" }'{
"account_id": "op_...",
"external_ref": "cus_your_id",
"billing": "partner",
"status": "active",
"created": true,
"created_at": "2026-10-25T09:00:00.000Z",
"api_key": "sk_live_..."
}api_key is returned exactly once, on the call that opened the account (201). A repeat returns 200 with created: false and no key. If the key is lost, replace it with rotate-key. Keep it on your server, never in a browser or an agent.
Each account is billed exactly as a customer's account is, with your prepaid wallet paying. It has its own platform plan (renewed on its own monthly anniversary from your wallet; a renewal the wallet cannot pay pauses that account until a top-up covers it, and you are warned three days before), its own free amounts and its own action bands, those of the standard plan and not your tier or your deal's figures. Every metered call (actions, including proxy calls and inbound-webhook receives; email; SMS; L3 classifications) counts against the account's own allowance, and usage past it is charged to your wallet at the normal prices. STACK staff set your deal's limits. wallet (default) bills the accounts as above; block is a hard cap shared by the whole pool, refused with 402 ALLOWANCE_EXHAUSTED, and the accounts are then not charged per account.
List your accounts, or read one. ?external_ref= returns only the account under that reference. Each view carries account_id, external_ref, billing: "partner", status, timestamps, invite: { status } (none, invited or active: never the address) and usage: { period, actions }, the account's own metered actions this UTC month, and plan (monthly_cents, status active or paused, renews_on and its controls). You never read an account's audit content, intent bodies or security events. An account that has been claimed is no longer yours: it returns 404.
Replace the account's key. The old key stops working at once and the new one is shown once. It needs your own API key as an owner or administrator, and refuses OAuth sessions.
Close an account. Its key stops working, and its inbound webhooks and passports are revoked. The cascade runs on every call, so a retried DELETE finishes a cascade that failed part-way. transitioned is false when the account was already closed.
{ "transitioned": true, "webhooks_revoked": 2, "passports_revoked": 5 }Invite the customer to see the account. The body takes the customer's email and an optional name. STACK mails the invitation and returns 201 with { "status": "invited", "expires_at": "..." }, never the address or the token. The invited customer signs in and sees the account, its agents and the record of what they did, read-only. They change nothing, connect nothing and spend nothing, and they may ask to leave. The address is stored as the invited person's own, and is the only personal data STACK holds before a release.
curl -X POST https://api.getstack.run/v1/partner/accounts/op_.../invite \
-H "Authorization: Bearer $STACK_PARTNER_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "email": "customer@example.com" }'An invitation to your own address or to a *.stack-tenant.local address returns 403. Invitations and releases together are limited to 60 per hour per partner; over that returns 429 RATE_LIMITED. If the mail cannot be delivered the call returns 503 and nothing is stored.
Mail the customer a claim link. The optional body { "email" } names where it goes; without it the link goes to the one customer you invited. With neither, or with more than one invited, the call returns 400 RELEASE_EMAIL_REQUIRED and nothing is sent. It returns 202 with the release record. The link works for 7 days. A repeat within ten minutes returns the pending release and sends nothing again.
{
"release": {
"account_id": "op_...",
"external_ref": "cus_your_id",
"status": "pending",
"requested_by": "partner",
"requested_at": "2026-10-25T09:00:00.000Z",
"expires_at": "2026-11-01T09:00:00.000Z",
"completed_at": null
}
}The customer opens the link and starts the platform trial with a card, through the same checkout every customer uses. The checkout is fixed to the address the link went to. The cardholder's name and billing country are checked against the sanctions lists. Only when the checkout is complete and the check clears does the account move.
If the claim does not complete (the link lapses, the check holds or refuses the customer, the checkout is not finished, or the address already belongs to another account), the account stays with you, nothing is charged and the release reads returned. The reason goes to STACK staff, never to you.
Read one release, or all of them, newest first. These read your own record of your releases, which stays readable for 90 days after the release ended. After a claim the account is no longer yours, so this record is how you learn that it completed.
Withdraw a pending release. The link stops working. It returns { "cancelled": true }, or false when none is pending. A release the customer asked for returns 409 RELEASE_NOT_AVAILABLE: the customer has decided to leave.
An invited customer signed in to the account can ask to leave from the STACK Console. STACK mails the claim link to their own address and the release reads requested_by: "customer". You are told through your record of releases and the audit entry on your own chain. You cannot refuse it.
Issue a Passport under an account. The body is the POST /v1/passports/issue body, so mission_ids must hold exactly one live Mission of that account. Open it with the account key, then issue with your partner key.
# 1. Open the Mission under the account (account key)
curl -X POST https://api.getstack.run/v1/missions \
-H "Authorization: Bearer $STACK_ACCOUNT_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "agent_id": "agt_account_agent", "intent_summary": "Triage inbound email", "intent_services": ["agentmail"] }'
# 2. Issue its Passport (partner key)
curl -X POST https://api.getstack.run/v1/partner/accounts/op_account/passports/issue \
-H "Authorization: Bearer $STACK_PARTNER_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "agent_id": "agt_account_agent", "mission_ids": ["ms_..."] }'An account key can also call POST /v1/missions/start to open the Mission and issue its Passport in one call. See Missions API.
Guarded changes made with an account key, such as activating a fleet policy, return 403 GOVERNANCE_APPROVAL_REQUIRED with an approval id. Accounts have no human user until they are claimed, so your account owner or an admin member approves them in the STACK Console queue, where each one is labelled with the account. Then retry the same call with the account key and the X-Governance-Approval header. API keys cannot approve. Each decision is recorded on the account's audit chain and on yours.
Provision, list and revoke an account's inbound webhooks with your partner key. The webhook secret is returned once on create and can be rotated.
A partner administrator configures webhook signing through a direct authenticated request. Send signing_secret in the JSON body. AgentMail uses its provider signing key; generic webhooks use the shared HMAC key configured at the sender. AgentMail forwarding can also set downstream_signing_secret for the receiving application. The response contains only {"configured":true}. OAuth and agent sessions cannot configure these keys. Keep keys in the administrator's local configuration; do not paste them into an assistant conversation.
SDK methods: partner.accounts.setInboundWebhookSigningSecret in TypeScript and partner_accounts.set_inbound_webhook_signing_secret in both Python clients. Both take the account ID, webhook ID, signing key, and an optional downstream key.
POST /v1/partner/accounts - open an account
GET /v1/partner/accounts - list accounts
GET /v1/partner/accounts/:account_id - get one account
DELETE /v1/partner/accounts/:account_id - close an account (cascades)
POST /v1/partner/accounts/:account_id/rotate-key - replace the account key
POST /v1/partner/accounts/:account_id/invite - invite the customer to see the account
POST /v1/partner/accounts/:account_id/release - mail the customer a claim link
GET /v1/partner/accounts/:account_id/release - read a release
DELETE /v1/partner/accounts/:account_id/release - withdraw a pending release
GET /v1/partner/releases - list your releases
POST /v1/partner/accounts/:account_id/inbound-webhooks - provision an inbound webhook
GET /v1/partner/accounts/:account_id/inbound-webhooks - list inbound webhooks
DELETE /v1/partner/accounts/:account_id/inbound-webhooks/:wh_id - revoke an inbound webhook
POST /v1/partner/accounts/:account_id/passports/issue - issue a passport under an account