Skip to content

Sub-Accounts Overview

Create isolated messaging accounts for your customers with independent API keys

View .md

Sub-accounts let you provision isolated messaging environments for each of your customers. Each sub-account gets its own API key, usage tracking, and optional spending cap — while all charges are billed to your team's balance.

Quick Start

  1. Create a sub-account

    terminal
    curl -X POST https://api.zavu.dev/v1/sub-accounts \ -H "Authorization: Bearer zv_live_xxx" \ -H "Content-Type: application/json" \ -d '{ "name": "Client ABC", "externalId": "client_123", "creditLimit": 100000 }'
  2. Save the API key

    The response includes the sub-account's API key. The API returns it once and has no way to return it again — store it when you receive it. If you lose it, open the sub-account in the dashboard and show the key from its API Keys screen, or create another key for it.

    JSON
    { "subAccount": { "id": "jx7abc123def456", "name": "Client ABC", "status": "active", "totalSpent": 0, "creditLimit": 100000, "apiKey": "zv_live_sub_xxxxxxxxxxxx", "createdAt": "2025-01-15T10:00:00Z" } }
  3. Your customer sends messages

    Your customer uses their API key to send messages:

    terminal
    curl -X POST https://api.zavu.dev/v1/messages \ -H "Authorization: Bearer zv_live_sub_xxxxxxxxxxxx" \ -d '{"to": "+14155551234", "text": "Hello from Client ABC!"}'

Guides

Important Rules

  • Sub-accounts share the team's balance but are fully isolated
  • Each sub-account has its own API keys, senders, phone numbers, contacts, and usage tracking
  • Credit limits are optional — omit or set to 0 for unlimited spending
  • When a credit limit is reached, the sub-account's messages are blocked
  • Deactivating a sub-account revokes all its API keys immediately