Credentials & Setup
Paste your partner API key and secret here — all tests below will use them automatically.

Partner credentials

How to get credentials Go to Zabili Admin → B2B Partners → New Partner → fill the form → credentials appear once in a modal. Copy both values above.

Quick connection test

Calls GET /partner/v1/markets with your credentials to verify they work.

Result will appear here…
Model 1 · Live Widget Preview Model 1
This is exactly what a partner's end-users will see when the widget is embedded on their site.

Widget iframe

Model 1 · Embed Snippet Model 1
Send this 3-line snippet to the partner. They paste it anywhere in their HTML.

Generated snippet for your API key:

— enter credentials first —

Partner can listen to events like this:

document.getElementById('zabili-widget') .addEventListener('zabili:trade.placed', (e) => { console.log('Trade placed:', e.detail); });
Model 2 · SSO Token Model 2
Exchange your user's ID for a scoped Zabili JWT. Your server calls this, then passes the token to your frontend.

POST /partner/v1/auth/token

Token will appear here…
Model 2 · List Markets Model 2
Returns all open markets. No user token needed — only partner credentials.

GET /partner/v1/markets

Markets will appear here…
Model 2 · Market Detail Model 2
Fetch prices, pool size, and status for a specific market.

GET /partner/v1/markets/:id

Market detail will appear here…
Model 2 · Place Trade Model 2
Requires a user JWT from the SSO step. Deducts from partner pool balance.

POST /partner/v1/markets/:id/trade

PrerequisiteRun the SSO step first to get a user token — or paste one below.

Estimated cost: $5.50

Trade result will appear here…
Model 2 · Account Balance Model 2
Returns partner pool balance and the user's open positions.

GET /partner/v1/account/balance

Balance will appear here…
Model 2 · Order History Model 2
Paginated order history for the authenticated partner user.

GET /partner/v1/account/history

Orders will appear here…
Model 2 · Webhook Test Model 2
Sends a test ping to the webhook URL configured on your partner account. Use webhook.site to catch it.

GET /partner/v1/webhook/test

The ping goes to the webhook URL saved on your partner account (editable in the admin panel).

Result will appear here…