Skip to main content
Use this guide when you run a platform and your customers rent phone numbers through you. A typical case is an AI voice agent platform: your agent talks to callers over a WebSocket stream, and each customer needs a verified number of their own. The model is simple. Every customer gets one Vobiz sub-account, created with a plus-slugged copy of their email. Your main account pays for everything. The customer completes KYC inside your app, and their numbers and calls stay scoped to their sub-account.

One sub-account per customer

Numbers, applications, calls, and CDRs are scoped to the customer. If one customer misuses a number, it is traceable to them and your main account stays clean.

One wallet, yours

Every call and number is charged to your main account. You set your own prices and credit limits for each customer.
Not sure this is the right model? Sub-accounts vs partner accounts compares it with partner accounts, where each customer gets their own wallet and capacity.

The whole flow

Before you start

Two credential pairs are in play. Keeping them apart prevents most integration bugs. All requests go to https://api.vobiz.ai/api/v1.
Path casing matters. Sub-account and KYC routes use lowercase /accounts/ and /sub-accounts/, number assignment uses /account/, and numbers, applications, and calls use /Account/. The wrong casing returns 401 or 404 even with valid credentials.

Step-by-step

1

Create a sub-account for the customer

Call Create a Subaccount with your parent credentials when the customer signs up. Set kyc_mode to customer_use so the customer verifies in their own name. Set business_type so the KYC widget asks for the right documents.
cURL
The response carries the sub-account’s auth_credentials. Save auth_id and auth_token against the customer in your database. The auth_token is shown only once. The sub-account starts with kyc_calls_blocked: true.
Always add a plus slug to the customer’s email. This is mandatory. Send asha+k7f3q9@example.com, never the bare asha@example.com.One email can hold only one Vobiz sub-account, and a second create with the same email fails because the email already exists. Your customer may already have a Vobiz account of their own, or a sub-account through another platform. Without a slug, their email is taken and you cannot onboard them.The slug gives every customer a unique email on your platform. Mail servers ignore everything after the +, so the customer still receives every KYC email in their normal inbox.
Follow these rules for the slug:
  • Generate it on your side and store it with the customer, so you can always rebuild the exact email.
  • Make it unique per sub-account, such as a short random or hashed ID.
  • Keep it to about 10 characters. The part before @ is limited to 64 characters. A long name plus a full UUID can exceed it, and the create fails.
  • Add it even for first-time customers. You cannot know whether the bare email is already in use.
2

Start a hosted KYC session inside your app

Call Initialize KYC with your parent credentials and the sub-account in the path. Use flow_type: "redirect" to get a widget_url back immediately.
cURL
201 Created
Open widget_url in an iframe or modal on top of your app, or redirect the customer to it. The widget asks for the documents that match business_type:Verification usually takes under a minute.
Store session_id, widget_url, and expires_at with the customer. Vobiz keeps each document’s state, so a customer who drops off after Aadhaar returns with Aadhaar still verified. Show a Resume KYC button that reopens the stored widget_url until it expires, then create a new session.
Set flow_type: "email" and customer_email instead. Vobiz emails the customer a signed link from kyc@vobiz.ai. It works without any UI on your side, but customers take longer to finish, so the in-app redirect flow converts better. See Email flow and webhook.
3

Know when KYC is done

Vobiz POSTs an event to your webhook_url at each stage of the session. Verify the X-Vobiz-Signature header, an HMAC-SHA256 of the raw body keyed with your parent auth_token, and return 2xx. Details are in Redirect flow and webhook.The webhook tells you the stage. Get KYC Status tells you exactly which documents are done and whether calls are allowed. Call it with your parent credentials when a webhook arrives, when the customer logs in again, or on a schedule if a webhook was missed.
cURL
200 OK
Gate calling on one field: kyc_calls_blocked must be false. In the example above, the customer finished Aadhaar but not PAN, so Resume KYC picks up at PAN.
Build against KYC test mode first. Magic inputs return verified, failed, or pending results with no real documents.
4

Give the customer a number

A customer can get a number before KYC finishes, but cannot place calls until it does. Pricing, KYC, and capacity are the same either way. The difference is which account the number lives in.
Buying a number spends real money from your main account balance. Run these calls only with your own credentials and after the customer has confirmed the number.
5

Point the number at your agent

Create an application inside the sub-account with Create an Application. Its answer_url returns the VobizXML that connects the call to your agent, usually a <Stream> to your WebSocket. Then attach the number to it.
cURL
Inbound calls to the number now reach your agent, and every call is recorded against the customer’s sub-account.
6

Place calls from the sub-account

Call Make an Outbound Call with the sub-account’s credentials and its own number as from. It succeeds only once kyc_calls_blocked is false.
cURL
A number bought in your pool and assigned to the sub-account can also be dialled with your parent credentials. Avoid it. The call then runs in your main account’s scope instead of the customer’s, which defeats the point of the sub-account.
7

Cap each customer's CPS and concurrency

Calls per second (CPS) and concurrent calls are pooled. Your main account and every sub-account draw from the same limits, and Vobiz does not split them per customer. Without your own caps, one busy customer can use most of the pool and starve the rest.Enforce a per-customer limit in your dialler before you call Make an Outbound Call. Most platforms tie it to the customer’s plan:Two numbers help with sizing:
  • CPS × 60 is your peak dial rate per minute. 25 CPS starts up to 1,500 calls a minute.
  • Concurrency counts every live call, including calls still ringing, not just answered ones. Watch it with the Concurrency API.
The CPS and concurrency visualizer shows how the two limits interact.
8

Bill each customer for their usage

Vobiz charges everything to your main account and does not track credit per customer. You keep each customer’s balance or credit limit in your own system.To price a customer’s usage, call List CDRs with the sub-account’s credentials. Each call record carries its duration and cost, and the summary block totals total_cost and total_billable_seconds for the filtered range. Apply your own rates on top.
cURL
Use CDRs, not the transactions ledger, for per-customer usage. A Transactions query with an SA_ ID returns your main account’s full ledger. List Account Phone Numbers with your parent credentials shows which sub-account owns each number.

Which credentials, at a glance

Launch checklist

  • Every sub-account email carries a short, unique plus slug. No bare emails.
  • Sub-accounts are created with customer_use and a business_type.
  • Each sub-account’s auth_token is stored encrypted at creation, because it is shown only once.
  • Your KYC webhook verifies X-Vobiz-Signature and returns 2xx quickly.
  • Your app re-checks KYC status on login, so a missed webhook never blocks a customer.
  • Calling is gated on kyc_calls_blocked being false.
  • Numbers, applications, and calls use the sub-account’s credentials.
  • Your dialler enforces per-customer CPS and concurrency caps.
  • Your billing reads CDRs per sub-account and applies your own rates.

Next steps

Sub-account onboarding API flow

The same flow as a compact API reference, with every request and response.

Sub-account KYC

Document matrix, call-blocking gate, and test mode.

Build an AI voice agent

Connect calls on the customer’s number to your agent over WebSockets.

Sub-accounts vs partner accounts

When to give customers their own wallet and capacity instead.