Everything here is scoped to one partner and requires a session token in an authorization: Bearer header, except the sign-in methods that run before a session exists: RequestLoginCode, VerifyLoginCode, BeginTotpEnrollment, CompleteLogin, and the Telegram and wallet login pairs. Every sign-in ends the same way. Email, Telegram, and wallet each open a login challenge, and only CompleteLogin with an authenticator code turns a challenge into a session. Telegram and wallets are extra sign-in methods on an account that already exists; they are connected from a signed-in session (see Sign-in methods) and never create an account.

Sessions

RequestLoginCode

Emails a six-digit code to email. Empty response. Repeat requests inside a minute are rejected rather than sending a second email.
string
required
Address to send the code to.
string
required
Cloudflare Turnstile token from the sign-in widget. Single-use; verified server-side before any code is sent.

VerifyLoginCode

Checks the emailed code and opens a login challenge. The challenge is not a session: it must be completed with an authenticator code through CompleteLogin within 5 minutes.
string
required
Address the code was sent to.
string
required
The six-digit code. Valid for 10 minutes and 5 attempts, after which it is discarded.
bool
Extends the resulting session from 1 day to 180 days.
string
Opaque challenge token for BeginTotpEnrollment and CompleteLogin.
bool
Whether the account already has an authenticator. When false, call BeginTotpEnrollment before CompleteLogin.

BeginTotpEnrollment

Generates a fresh TOTP secret for an account that has no authenticator yet. The secret only becomes active once CompleteLogin accepts a code derived from it. Accounts that already have an authenticator get FAILED_PRECONDITION. Only a challenge opened by email can enroll; a challenge from Telegram or a wallet is treated as unknown here.
string
required
Challenge from VerifyLoginCode.
string
Base32 secret for manual entry.
string
otpauth://totp/... URL to render as a QR code. SHA1, six digits, 30-second period, so Google Authenticator and every common app can import it.

CompleteLogin

Exchanges the challenge and a current authenticator code for a session. Each challenge allows 5 wrong codes, and a code that was already accepted is refused until the next one.
string
required
Challenge from VerifyLoginCode, FinishTelegramLogin, or FinishWalletLogin.
string
required
Six-digit code from the authenticator app.
string
Session token. Send as authorization: Bearer <token>.
string
Expiry timestamp.

StartTelegramLogin

Opens a Telegram sign-in. The user opens bot_url and presses Start; the bot replies in that chat with a six-digit code if the Telegram account is connected to a Blink account, and says it is not connected otherwise. The deployment must have a Telegram bot configured, or the call returns UNAVAILABLE.
string
Opaque token for FinishTelegramLogin.
string
https://t.me/<bot>?start=<token>. Open it as a link or render it as a QR code.
string
When the link and its code stop working, 10 minutes after the call.

FinishTelegramLogin

Checks the code the bot sent and opens a login challenge, to be completed through CompleteLogin like an email sign-in. totp_enrolled is always true; an account without an authenticator gets FAILED_PRECONDITION and must sign in with email first.
string
required
Token from StartTelegramLogin.
string
required
The six-digit code from the bot. Allows 5 attempts, after which it is discarded.
bool
Extends the resulting session from 1 day to 180 days.

StartWalletLogin

Builds a Sign-In with Ethereum (EIP-4361) message for an EVM address. Sign it with personal_sign and pass the signature to FinishWalletLogin within 5 minutes. The call does not reveal whether the address is connected to an account.
string
required
The EVM address that will sign, 0x hex.
LoginPanel
The panel the user is signing in to. The message names that panel’s domain, so the wallet shows the site the user is on. Defaults to the partner panel.
string
Single-use nonce, also embedded in the message.
string
The exact text to sign.

FinishWalletLogin

Checks the signature and opens a login challenge, to be completed through CompleteLogin. The signer is recovered from the message with EIP-191, so the wallet must be an externally owned account; contract wallets are not supported. The nonce is consumed whether or not the signature is valid. totp_enrolled is always true; an account without an authenticator gets FAILED_PRECONDITION and must sign in with email first.
string
required
Nonce from StartWalletLogin.
string
required
The 65-byte personal_sign signature, 0x hex.
bool
Extends the resulting session from 1 day to 180 days.

Logout

Invalidates the calling session immediately.

ListPartnerSessions

Every live session on the account, most recently active first.
PartnerSessionInfo[]
Each with id, ips, user_agent, created_at, expires_at, last_used_at, and current. ips lists every address the session has been used from, each with ip, a best-effort location, and last_seen. current marks the session making the call.
bool
Whether the calling session is old enough to revoke others; see RevokePartnerSession.

RevokePartnerSession

Takes a session id and invalidates it immediately. The calling session must be at least 6 hours old, so a freshly stolen token cannot immediately evict the account’s other sessions; a younger session gets PERMISSION_DENIED. The calling session cannot revoke itself; use Logout for that.

Sign-in methods

A partner account always signs in with its email. It can also connect one Telegram account and up to 5 EVM wallets, each of which belongs to one account only. GetPartner lists them in login_methods. Connecting and removing a method both need a current authenticator code from the signed-in session, so a stolen session token alone cannot change how the account signs in. The code is checked like a sign-in code: one that was already accepted is refused until the next one. After 5 wrong codes the session is closed and must sign in again.
Checks totp_code and opens a Telegram link for the calling account. The user opens bot_url and presses Start, and the bot replies with a six-digit code for FinishTelegramLink. An account that already has a Telegram account connected gets FAILED_PRECONDITION.
string
required
Six-digit code from the authenticator app.
Checks the code the bot sent and connects the Telegram account that pressed Start. A Telegram account that is already connected to an account gets ALREADY_EXISTS.
string
required
Token from StartTelegramLink.
string
required
The six-digit code from the bot. Valid for 10 minutes and 5 attempts.
Checks totp_code and returns a Sign-In with Ethereum message for address, bound to the partner panel’s domain. Sign it with personal_sign and pass the signature to FinishWalletLink within 5 minutes. An address that is already connected gets ALREADY_EXISTS, and an account at the wallet limit gets FAILED_PRECONDITION, both before the authenticator code is used.
string
required
The EVM address to connect, 0x hex.
string
required
Six-digit code from the authenticator app.
Checks the signature and connects the wallet. As with sign-in, only externally owned accounts can sign, and the nonce is consumed whether or not the signature is valid.
string
required
Nonce from StartWalletLink.
string
required
The 65-byte personal_sign signature, 0x hex.

RemoveLoginMethod

Checks totp_code and disconnects a Telegram account or wallet by its id from login_methods. Email cannot be removed. Sessions already opened with the method stay live; revoke them from the Sessions listing if needed.
string
required
Id of the sign-in method.
string
required
Six-digit code from the authenticator app.

Usage

GetPartnerApiStats

Time-bucketed request and rate limit metrics for your API keys, powering the panel’s Usage tab.
int64
Window ending now. Defaults to one day; at most 30 days.
int64
Bucket width. Defaults to five minutes; at least 60 seconds, and the range may span at most 500 buckets.
RequestSeries[]
One series per (key_id, method, status) with request counts per bucket. status is the lowercase gRPC code name: ok, resource_exhausted, invalid_argument, and so on.
PointsSeries[]
One series per key_id with rate limit points consumed per bucket.

API keys

GetPartner

string
Partner email.
PartnerApiKey[]
Existing keys, each with id, key, name, tier, points_per_min, disabled, created_at, and can_sponsor. points_per_min is the key’s rate limit budget; unset means the deployment default. can_sponsor is whether quotes made with the key may set sponsor_fees and spend your funding balance; it is off for new keys.
int64
Cap on active keys.
LoginMethod[]
Connected Telegram accounts and wallets, oldest first, each with id, kind (LOGIN_METHOD_KIND_TELEGRAM or LOGIN_METHOD_KIND_EVM_WALLET), subject, label, and created_at. subject is the Telegram user id or the checksummed wallet address; label is the Telegram username when the account has one. Email is not listed here.
int64
Cap on connected wallets.

CreatePartnerApiKey

Takes a name and returns the created key, including its secret value. Name keys after the surface that uses them: the name comes back on attributed orders.

RevokePartnerApiKey

Takes an id. Requests using that key then fail with api key disabled, within a few seconds of the change.

UpdatePartnerApiKey

Takes an id and can_sponsor, and returns the updated key. Keep sponsoring off for any key that ships in a browser bundle or other public client: anyone holding such a key could otherwise spend your funding balance. The change applies within a few seconds.

Attributed orders

ListPartnerOrders

Orders originated by your keys, newest first.
int64
Page size. Defaults to 20, clamped to 100.
string
Cursor from the previous page.
PartnerOrder[]
Each carries quote_hash, state, src_chain, dst_chain, deposit_token, deposit_amount, deposit_symbol, deposit_decimals, referrer_fee, api_key_name, and created_at.
string
Absent on the last page.

Referrals

GetPartnerReferrals

Claimable balances, grouped.
PartnerReferralGroup[]
Each carries referrer, chain, chain_id, token, token_symbol, decimals, amount, and the count of orders behind it.
string
Absent on the last page.

ClaimPartnerReferrer

string
required
Referrer address to claim for.
string
required
Chain the balance accrued on.
string
required
Token the balance is denominated in.
Marks the covered orders claimed, totals them, and returns a signed Voucher. The voucher can only pay the referrer address embedded in it.

ListPartnerVouchers

Every voucher issued to you with its redemption status, kept current from on-chain VoucherRedeemed events. Takes no arguments.

BuildVoucherRedemption

string
required
Voucher to redeem.
string
required
Address that will pay the transaction fee. It does not have to be the referrer.
string
Prepared transaction, base64 encoded. On Solana it already includes the ed25519 verification instruction the program requires.
EVM vouchers can instead be redeemed by calling redeemVoucher on the fee manager in the voucher’s router_address with the fields from the voucher; the calldata field on the voucher carries a ready-to-send payload.

Funding

A funding balance pays the relay gas for quotes requested with sponsor_fees, so the cost comes out of the partner’s prepaid balance instead of the user’s output. Deposits are made on one designated chain through the router’s fundPartner entry point; debits happen per sponsored order. See SubmitGaslessOrder.

GetPartnerFunding

Takes no arguments.
string
Total balance across funding tokens, USD micros.
string
The funding chain. Deposits and balances live here.
uint64
Its EVM chain id. Optional.
string
Router contract that fundPartner is called on.
FundingToken[]
Tokens accepted for funding, each with chain, chain_id, address, symbol, and decimals.
PartnerFundingBalance[]
Current balance per token: token, amount in base units, and usd_micros.

BuildPartnerFunding

string
required
One of the accepted funding tokens.
string
required
Amount to deposit, base units.
Returns the transaction to send: partner_id (the account id as a 32-byte word), router_address, ready calldata for fundPartner, and value (non-zero for a native deposit). Nothing is recorded until the transaction lands; the deposit is credited once the indexer sees the PartnerFunding event carrying the partner id and the transaction is final.

ListPartnerFundingActivity

Takes an optional limit, defaulting to 20 and clamped to 100. Returns entries newest first, each with a kind of deposit or debit, the delta, token, created_at, and a status of pending or credited. Deposits carry their tx_hash; debits carry the quote_hash of the sponsored order.

Errors