> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zavu.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# List sub-accounts

> List sub-accounts for this team. Requires a parent project API key; sub-account API keys receive HTTP 403.



## OpenAPI

````yaml /openapi.json get /v1/sub-accounts
openapi: 3.0.3
info:
  title: Zavu Unified Messaging Layer API
  version: 0.2.0
  description: >
    Unified multi-channel messaging API for Zavu.


    Supported channels:

    - **SMS**: Simple text messages

    - **WhatsApp**: Rich messaging with media, buttons, lists, CTA URL buttons,
    and templates

    - **Telegram**: Bot messaging with text, media, and interactive elements

    - **Email**: Transactional emails via Amazon SES


    Design goals:

    - Simple `send()` entrypoint for developers

    - Project-level authentication via Bearer token

    - Support for all WhatsApp message types (text, image, video, audio,
    document, sticker, location, contact, buttons, list, cta_url, reaction,
    template)

    - If a non-text message type is sent, WhatsApp channel is used automatically

    - 24-hour WhatsApp conversation window enforcement

    - Universal `to` field accepts phone numbers (E.164), email addresses, or
    numeric chat IDs (Telegram/Instagram)
servers:
  - url: https://api.zavu.dev
security:
  - bearerAuth: []
paths:
  /v1/sub-accounts:
    get:
      tags:
        - Sub-Accounts
      summary: List sub-accounts
      description: >-
        List sub-accounts for this team. Requires a parent project API key;
        sub-account API keys receive HTTP 403.
      operationId: listSubAccounts
      parameters:
        - name: limit
          in: query
          schema:
            type: integer
            default: 50
            maximum: 100
        - name: cursor
          in: query
          schema:
            type: string
      responses:
        '200':
          description: List of sub-accounts.
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/SubAccount'
                  nextCursor:
                    type: string
                    nullable: true
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden. Sub-account API keys cannot manage sub-accounts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    SubAccount:
      type: object
      required:
        - id
        - name
        - status
        - totalSpent
        - createdAt
      properties:
        id:
          type: string
        name:
          type: string
          example: Client ABC
        externalId:
          type: string
          nullable: true
          description: External reference ID set by the parent account.
        status:
          $ref: '#/components/schemas/SubAccountStatus'
        totalSpent:
          type: integer
          description: Total amount spent by this sub-account in cents.
        creditLimit:
          type: integer
          nullable: true
          description: >-
            Spending cap in cents. When reached, messages from this sub-account
            will be blocked.
        metadata:
          type: object
          nullable: true
          additionalProperties: true
        apiKey:
          type: string
          description: API key for the sub-account. Only returned on creation.
        createdAt:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          example: invalid_request
        message:
          type: string
          example: Phone number is invalid
        details:
          type: object
          additionalProperties: true
    SubAccountStatus:
      type: string
      enum:
        - active
        - inactive
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````