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

# Create Client

> Creates a new client account under the authenticated tenant, including user accounts, a client account configuration, billing configuration, and access permissions.

## Authentication
All requests require an `Authorization` header using Bearer token authentication:
`Authorization: Bearer <api_key>`



## OpenAPI

````yaml POST /api/v2/clients/create
openapi: 3.1.0
info:
  title: VoiceAIWrapper API
  description: >-
    REST API for managing campaigns, leads, clients, web widgets, and voice
    providers on VoiceAIWrapper.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.voiceaiwrapper.app
security:
  - bearerAuth: []
paths:
  /api/v2/clients/create:
    post:
      tags:
        - Clients
      summary: Create Client
      description: >-
        Creates a new client account under the authenticated tenant, including
        user accounts, a client account configuration, billing configuration,
        and access permissions.


        ## Authentication

        All requests require an `Authorization` header using Bearer token
        authentication:

        `Authorization: Bearer <api_key>`
      operationId: createClient
      requestBody:
        required: true
        description: Client account configuration
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateClientRequest'
      responses:
        '201':
          description: >-
            Client created successfully. Returns client ID, name, email, user
            list, and client account configuration ID.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Client created successfully
                  data:
                    type: object
                    properties:
                      client_id:
                        type: string
                      client_name:
                        type: string
                      primary_email:
                        type: string
                      users:
                        type: array
                        items:
                          type: object
                      asset_group_id:
                        type: string
        '400':
          description: >-
            Invalid request data. Common causes: missing client users, invalid
            JSON, missing voice provider ID, or invalid access permission
            values.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Validation error
                  errors:
                    type: object
              example:
                message: Validation error
                errors:
                  client_users:
                    - At least one client user is required
        '401':
          description: Authentication failed. Ensure the Bearer token is present and valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '500':
          description: Internal server error. Contact support if this persists.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Internal server error
                  error:
                    type: string
components:
  schemas:
    CreateClientRequest:
      type: object
      required:
        - client_users
        - client_details
        - client_asset_group
      properties:
        client_users:
          type: array
          description: >-
            List of user accounts to create for this client. Required. At least
            one user must be provided.
          items:
            type: object
            required:
              - email
              - password
            properties:
              email:
                type: string
                format: email
                example: user@client.com
              password:
                type: string
                example: SecureP@ss123
        client_details:
          type: object
          description: Basic client account details. Optional.
          properties:
            name:
              type: string
              example: Acme Corp
            email:
              type: string
              format: email
              example: acme@example.com
        client_asset_group:
          type: object
          description: >-
            Client account configuration. Required. tenant_voice_provider_id is
            required.
          required:
            - tenant_voice_provider_id
          properties:
            name:
              type: string
              description: |-
                Name of the client asset group. Optional.
                 Note: `client_asset_group` = `client_account_configuration`
              example: Default Group
            tenant_voice_provider_id:
              type: string
              description: >-
                Global ID of the voice provider to use for this client's client
                account configuration. Required.
                 Note: `tenant_voice_provider_id` = `voiceai_pod_id`
              example: VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=
        billing_provider:
          type: object
          description: Billing configuration. Optional. Defaults to empty if not provided.
          example:
            type: STRIPE
            selected_product:
              product_id: ...
              price_ids:
                - ...
        client_access:
          type: object
          description: >-
            Dashboard permission settings. Optional. All fields optional -
            omitted fields use defaults. See endpoint description for full list
            of allowed values per field.
          example:
            assistant: view_only
            campaign: view_and_add
        assigned_resources:
          $ref: '#/components/schemas/AssignedResources'
          type: object
          description: >-
            Resources to assign to the client's client account configuration.
            Optional.
    ErrorMessage:
      type: object
      properties:
        message:
          type: string
    AssignedResources:
      type: object
      properties:
        assistant:
          type: array
          items:
            type: string
          example:
            - asst_abc123
        vapi_workflow:
          type: array
          items:
            type: string
          example: []
        vapi_squad:
          type: array
          items:
            type: string
          example: []
        phone_number:
          type: array
          items:
            type: string
          example: []
        phone_number_pool:
          type: array
          items:
            type: string
          example: []
        knowledge_base:
          type: array
          items:
            type: string
          example: []
        tools_and_functions:
          type: array
          items:
            type: string
          example: []
        campaign:
          type: array
          items:
            type: string
          example:
            - Vm9pY2VDYW1wYWlnbjoxMjM=
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````