Vobiz Partner API skill
Use this for reseller workflows where one partner master account owns multiple partner child accounts (the docs also call them customer accounts or customer sub-accounts). Each child is a full Vobiz main account (MA_…) with its own wallet, KYC, numbers, CPS, and concurrency. Auth uses the same X-Auth-ID / X-Auth-Token headers as the main API - there is no separate Bearer JWT for server-to-server calls. Just use your partner-tier credentials. (POST /login exchanges email + password for a JWT, but the docs reserve it for interactive sessions; it is doc-only and not in openapi.yaml.)
Not sure whether the user needs partner child accounts or sub-accounts? See concepts/sub-accounts-vs-partner-accounts and the vobiz-sub-accounts skill.
Base path
https://api.vobiz.ai/api/v1/partner/*
(Routes do NOT live under /partner/v1/ - that path returns 404.) Send Accept: application/json, and Content-Type: application/json on bodies.
Partner profile + dashboard
GET /api/v1/partner/me- your partner profile:id(UUID),auth_id(PA_…),balance(string, 5 decimals),currency,max_accounts,account_count,is_verified, and the capability flagscan_create_accounts,can_transfer_balance,can_view_cdrs,can_create_pricing_tiers.GET /api/v1/partner/dashboard- aggregated metrics over aperiod:accounts {total, active, customers[]},total_balance(string),currency,calls,traffic {inbound, outbound},by_product {sip_trunking, voice_api},time_series[].partner.balanceisnullhere.GET /api/v1/partner/analytics?from_date=&to_date=- same shape over a custom window (defaults to the last 30 days). Doc-only (partner/api/analytics), not in the spec.
Auth model in one line: partner creds (PA_…) drive /api/v1/partner/*; the customer's own creds (MA_…) drive /api/v1/Account/{customer_auth_id}/* voice ops. Your partner token cannot drive a customer's voice resources. Sending the wrong pair against the wrong base path returns 401/403.
Customer accounts
GET /api/v1/partner/accounts- list customers. Pagination params arepage+per_page(default 20, max 100); the response echoesper_pageback assize.searchsubstring-matches name or email. Rows carrycash_credits,kyc_status,cps_limit,concurrent_calls_limit,pricing_tier.POST /api/v1/partner/accounts- create customer. Required:name, email, phone, password, country. Optional (guaranteed):company; other optional fields onpartner/api/customersare best-effort. Returns201with the customer's ownauth_id+auth_tokenin clear - store theauth_tokenencrypted server-side immediately; later reads show it redacted, andGET /accounts/{customer_auth_id}is the documented way to retrieve it again.emailmust be platform-unique (422/409);passwordneeds 8+ chars with a number and special char (422);403whencan_create_accountsisfalseor you hitmax_accounts. New customers startstatus: active,balance: 0.00,kyc_status: pending.GET /api/v1/partner/accounts/{customer_auth_id}- full customer profile.GET /api/v1/partner/accounts/{customer_auth_id}/balance- real-time wallet:{auth_id, name, cash_credits, currency, updated_at}.
(GET /accounts/{id} and /balance are doc-only - see partner/api/customers.)
Balance transfer
POST /api/v1/partner/accounts/{customer_auth_id}/transfer-balance- atomic debit/credit, both legs in each ledger. Body:{amount, currency, description?}.currencymust equal your partner currency (no FX conversion). Response200:{transaction_id, from_account, to_account, amount, currency, status: "completed", partner_balance_after, customer_balance_after, timestamp}- there is nopendingstate. Permanent - cannot be reversed via API; no idempotency key (poll customer transactions before retrying a timed-out request).400on insufficient partner balance (error: insufficient_balancewithcurrent_balance/requested_amount/currency), non-positiveamount, or currency mismatch;401/403whencan_transfer_balanceisfalse;404if the customer isn't yours.
CPS and concurrency allocation (capacity)
Partner child accounts own their CPS and concurrent-call limits. You move slots between your partner pool and a customer with these routes (documented on partner/api/capacity; not yet in openapi.yaml). Partner creds, customer auth_id in the URL.
| Op | Path | Body / query |
|---|---|---|
| Transfer to customer | POST /api/v1/partner/accounts/{customer_auth_id}/concurrency/transfer |
{resource?: "concurrent_calls" (default) | "cps", slots: 1-10000, description?: ≤500 chars} |
| Reclaim from customer | POST /api/v1/partner/accounts/{customer_auth_id}/concurrency/reclaim |
same body |
| View allocation | GET /api/v1/partner/accounts/{customer_auth_id}/concurrency |
→ partner_concurrent_calls_limit, customer_concurrent_calls_limit, net_concurrent_calls_allocated, partner_cps_limit, customer_cps_limit, net_cps_allocated |
| Transfer history | GET /api/v1/partner/concurrency/transfers?limit=50&offset=0 |
limit 1-200 (default 50), offset default 0, newest first |
Transfer/reclaim response: {success, slots, resource, from_account, to_account, transfer_reference, partner_remaining, customer_effective, message}.
Pitfalls:
- The path says
concurrencybut it serves both resources - always setresourceexplicitly. CPS and concurrent calls move in separate requests. - A transfer is additive: it subtracts
slotsfrom your limit and adds them to the customer's. It does not set the customer's limit toslots. ReadGET .../concurrencyfirst and confirmresource+slotswith the user before firing. - Reclaim cannot exceed the net capacity you previously allocated for that resource, nor the customer's current limit.
- Requirements: active partner, limit-transfer access enabled for both resources (via support@vobiz.ai), the customer belongs to you and is not itself a partner, and you have enough pool capacity. Both accounts update together; allow up to five minutes if the refreshed limits lag.
- Keep
transfer_referenceand reconcile againstGET /concurrency/transfers.
KYC sessions (eKYC, no document uploads)
eKYC pulls data from govt APIs - no uploads. Individual (PAN 4th char = P): PAN + DOB → Aadhaar via DigiLocker (Govt OTP). Company (PAN 4th char = C): PAN + entity name → GSTIN. The PAN determines the path; the partner does not pick it.
POST /api/v1/partner/kyc-sessions- body:{account_auth_id, flow_type?, customer_email?, redirect_url?, webhook_url?, expires_in_days?, reminder_schedule?, metadata?}. Returns201.flow_type: "email"(default) requirescustomer_email; session starts atemail_sent; response hasemail_dispatched_to(masked).flow_type: "redirect"requiresredirect_url; response carrieswidget_url(tokenkst_<64hex>), session starts atlink_ready. After verify, browser returns toredirect_url?session_id=&status=&auth_id=- treat those params as a hint only, confirm server-side.expires_in_daysdefault 7.reminder_scheduleitems:{trigger: "days_before_expiry", value: <int>}(email flow).metadatais echoed back on GET + webhooks.422validation (missingcustomer_email/redirect_url, malformedreminder_schedule, bad JSON -details[]withloc/msg);404ifaccount_auth_idisn't yours.
GET /api/v1/partner/kyc-sessions- list (filterstatus/account_auth_id; paginated withpage/size, default 20).GET /api/v1/partner/kyc-sessions/{session_id}- one session:id,status,kyc_type,expires_at,first_opened_at,completed_at,metadata,verified_data. Note: GET returns the id underid, POST returned it undersession_id(same value).POST /api/v1/partner/kyc-sessions/{session_id}/resend- resend email. Email-flow only (400on redirect flow).409if the session is terminal. The 30-min cooldown starts at session creation, so an immediate resend returns429with remaining seconds in the message.DELETE /api/v1/partner/kyc-sessions/{session_id}- revoke (optional{reason}body).200 {message, session_id};409if already terminal.
Webhook events on webhook_url: kyc.completed, kyc.failed, kyc.session_revoked. Statuses: email_sent | link_ready → opened → in_progress → kyc_completed | revoked. kyc_type is null until PAN is submitted, then individual or company. On kyc_completed the customer's kyc_status flips to completed.
Per-customer queries
GET /api/v1/partner/accounts/{customer_auth_id}/transactions- paginationpage/per_page(max 200; over-limit →422); date filtersfrom_date/to_date;transaction_type∈recharge|debit|refund|transfer. Each row'stypefield is the ledger directioncredit/debit(different vocabulary from the filter). Includes asummaryblock andtotal_pages. Partner transfers land on the customer ledger ascreditrows with referenceptc:<partner_id>:<customer_auth_id>:<unix_ts>.GET /api/v1/partner/accounts/{customer_auth_id}/cdrs- filtersstart_date,end_date(notfrom_date/to_date),call_direction(inbound|outbound),status(answered|failed|busy|no_answer- underscored),min_duration,hangup_cause;page/per_page(max 100). Response wraps rows indata[]+pagination+summary. Bill onbillsec(billable seconds) orsummary.total_cost.GET /api/v1/partner/accounts/{customer_auth_id}/numbers- paginationpage/per_page;search(E.164 substring). Response{items[], page, per_page, total, account_auth_id}. Read-only; assign/release via Console.- Global variants
GET /transactions,GET /cdrs,GET /accounts/{customer_auth_id}/cdrs/{call_uuid},GET /numbersare doc-only (same filters) - seepartner/api/transactions,partner/api/cdrs,partner/api/numbers.
Customer-side endpoints
Same auth scheme, but uses the customer's auth_id/auth_token against /api/v1/Account/{customer_auth_id}/* (inventory, purchase/release numbers, trunks, calls, CDRs). The customer can call these themselves, or the partner can call them on the customer's behalf using the customer's stored auth_token.
Pitfalls
- Base path is
/api/v1/partner, not/partner/v1. The latter 404s. Full base:https://api.vobiz.ai/api/v1/partner. balanceis a string with 5 decimals ("23906.83000"). Cast to float before comparing. OnGET /dashboardthe partnerbalanceisnull- usetotal_balancethere. Customer wallets arecash_credits(also a string).- Pagination keys differ by endpoint. Accounts/transactions/cdrs/numbers use
per_page; KYC sessions list usessize. The accounts list acceptsper_pagebut returns it assize. - Balance transfer is irreversible and has no idempotency key. Verify
customer_auth_id,amount, andcurrency(must match partner currency) before firing. If a request times out, poll customer transactions (matchamount+ recentcreated_at) before retrying to avoid a double credit. - Capacity transfers are additive, per-resource, and gated by support-enabled access. Read the current allocation first; confirm
resourceandslotsbefore firing. - Only one active KYC session per
account_auth_id. Creating a new one silently auto-revokes the previous - always operate on the most recentsession_id, or you'll get409s. - KYC resend cooldown starts at creation, so an immediate resend returns
429. Resend is email-flow only. - Redirect-flow return params can be spoofed - confirm via the
kyc.completedwebhook or a server-sideGET /kyc-sessions/{id}before unlocking. - Never expose tokens client-side. The partner token and customer
auth_tokens are long-lived money-moving secrets. Keep them server-side; rotate from the Console if leaked. - Capability flags gate operations.
can_create_accounts/can_transfer_balancebeingfalsereturns403;can_view_cdrsbeingfalseblocks the CDR endpoints. CheckGET /me. - Two "type" vocabularies on transactions. Filter with
transaction_type=recharge|debit|refund|transfer; rows report direction astype: credit|debit.
Complete onboarding recipe
Run in order; each step depends on the previous:
- Preflight -
GET /me; confirmcan_create_accountsandcan_transfer_balancearetrue,account_count < max_accounts, andfloat(balance) >= amount. - Create customer -
POST /accountswith{name,email,phone,password,country,company?}. Captureauth_id+auth_token(store the token encrypted). - Fund wallet -
POST /accounts/{auth_id}/transfer-balancewith{amount, currency}(currency = your partner currency). Confirm with the user first - irreversible. Assert responsepartner_balance_after >= 0andstatus == "completed". - Start KYC -
POST /kyc-sessionswith{account_auth_id: auth_id, flow_type, webhook_url, expires_in_days:14, ...}(email flow needscustomer_email; redirect flow needsredirect_url). Storesession_id. - Wait for completion - receive
kyc.completedonwebhook_url(verify server-side, see below), or pollGET /kyc-sessions/{session_id}untilstatus == "kyc_completed". - Allocate capacity (optional) -
POST /accounts/{auth_id}/concurrency/transferonce per resource if the customer needs more than the default CPS / concurrent-call limits. - Provision usage - assign a DID via Console, then hand the customer their
auth_id/auth_tokento drive voice ops on/api/v1/Account/{auth_id}/*. - Monitor - per-customer
cdrs/transactionsfor billing; recharge beforecash_creditshits zero.
Webhook verification snippet
Re-fetch the session before trusting the POST body; respond 200 fast; stay idempotent (retries with exponential backoff on non-2xx).
event = request.json()
session = httpx.get(f"{BASE}/kyc-sessions/{event['session_id']}", headers=PARTNER_HEADERS).json()
if session["status"] == "kyc_completed":
activate_customer(session["account_auth_id"]) # idempotent
return ("", 200)When to search docs
- Full reseller onboarding flow →
partner/flow - Auth scopes, JWT login, auth errors →
partner/api/authentication - Customer creation and optional fields →
partner/api/customers - Balance transfer errors and checklist →
partner/api/balance - CPS / concurrency transfer and reclaim →
partner/api/capacity - KYC sessions end-to-end, session object,
verified_data→partner/api/kyc-sessions - Transaction reconciliation →
partner/api/transactions - Sub-account vs partner child account decision →
concepts/sub-accounts-vs-partner-accounts