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

# Create Client

> Provisions a new client within the authenticated organization.

Validation rules:
- `name`, `type`, and `subscription_plan` are required. `name` is unique within your organization.
- `contact_email` must be a valid email address. Phone numbers must be 7-15 digits with an optional leading `+`.
- `status` defaults to `active` if omitted and must be one of `active`, `inactive`, `trial`, `churned`, `pending`.
- A URL-safe `slug` is derived from `name` automatically; collisions are resolved with a numeric suffix.

Rate limit: this endpoint is capped at **10 requests per minute per API key** in addition to the default per-key limit.




## OpenAPI

````yaml POST /v1/clients
openapi: 3.1.0
info:
  title: Voxfra Management API
  description: >
    Tenant-facing REST API for integrating with Voxfra's voice intelligence
    infrastructure.

    Use this API to read call data, manage clients, and build partner
    dashboards.


    ## Authentication


    All endpoints except `GET /health` require an API key passed in the
    `X-API-Key` header.

    API keys are scoped to a single organization — all responses are
    automatically filtered to your org.


    Keys are issued by your Voxfra account manager or via the Voxfra admin
    console.
  version: 1.0.0
  contact:
    name: Voxfra Support
    email: support@voxfra.com
  license:
    name: Proprietary
    url: https://voxfra.com/terms
servers:
  - url: https://mgmt-api.voxfra.com
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Health
    description: System status
  - name: Auth
    description: Verify and inspect the current API key
  - name: Clients
    description: >-
      Read and provision clients (dealerships, clinics, etc.) within your
      organization
  - name: Calls
    description: Access call records ingested through voxfra
  - name: Customers
    description: >-
      Access tenant-scoped customer records deduplicated within organization and
      client boundaries
paths:
  /v1/clients:
    post:
      tags:
        - Clients
      summary: Create a client
      description: >
        Provisions a new client within the authenticated organization.


        Validation rules:

        - `name`, `type`, and `subscription_plan` are required. `name` is unique
        within your organization.

        - `contact_email` must be a valid email address. Phone numbers must be
        7-15 digits with an optional leading `+`.

        - `status` defaults to `active` if omitted and must be one of `active`,
        `inactive`, `trial`, `churned`, `pending`.

        - A URL-safe `slug` is derived from `name` automatically; collisions are
        resolved with a numeric suffix.


        Rate limit: this endpoint is capped at **10 requests per minute per API
        key** in addition to the default per-key limit.
      operationId: createClient
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateClientBody'
            example:
              name: ABC Motors
              display_name: ABC Motors - Downtown
              type: automotive
              subscription_plan: Pro
              status: active
              contact_person: Jane Smith
              contact_email: jane@abcmotors.com
              phone_number: '+15551234567'
      responses:
        '201':
          description: Client created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientSingleResponse'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Bad Request
                message: name is required.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '409':
          description: A client with this name or slug already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Conflict
                message: A client with this name already exists in your organization.
        '429':
          description: Rate limit exceeded (10/minute per API key for this endpoint)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    CreateClientBody:
      type: object
      required:
        - name
        - type
        - subscription_plan
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 200
          description: Display name of the client. Must be unique within your organization.
          example: ABC Motors
        display_name:
          type: string
          maxLength: 255
          description: Optional public-facing label. Defaults to `name` when omitted.
          example: ABC Motors - Downtown
        type:
          type: string
          minLength: 1
          maxLength: 100
          description: Free-text business type identifier (e.g., `automotive`, `medical`).
          example: automotive
        subscription_plan:
          type: string
          minLength: 1
          maxLength: 100
          description: >
            Subscription plan label. Currently UI-only metadata — the API does
            not yet

            enforce a fixed enum so partners can introduce new plan names
            without a

            schema migration. A canonical enum will be added once billing is
            wired in.
          example: Pro
        status:
          type: string
          enum:
            - active
            - inactive
            - trial
            - churned
            - pending
          default: active
          description: Lifecycle state. Defaults to `active` when omitted.
        contact_person:
          type: string
          maxLength: 255
        contact_email:
          type: string
          format: email
          maxLength: 255
        phone_number:
          type: string
          description: >-
            7-15 digits with optional leading `+`. Whitespace, dashes, and
            parentheses are stripped before storage.
          example: '+15551234567'
    ClientSingleResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Client'
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
    Client:
      type: object
      properties:
        id:
          type: string
          format: uuid
        organization_id:
          type: string
          format: uuid
        name:
          type: string
          example: ABC Motors Test Client
        display_name:
          type:
            - string
            - 'null'
          example: ABC Motors - Downtown
        type:
          type: string
          example: automotive
        status:
          type: string
          enum:
            - active
            - inactive
            - trial
            - churned
            - pending
        subscription_plan:
          type: string
          example: pro
        contact_person:
          type:
            - string
            - 'null'
        contact_email:
          type:
            - string
            - 'null'
          format: email
        phone_number:
          type:
            - string
            - 'null'
        joined_at:
          type: string
          format: date-time
        last_active_at:
          type:
            - string
            - 'null'
          format: date-time
  responses:
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Unauthorized
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Internal Server Error
            message: Unexpected error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: |
        Your Voxfra management API key. Passed as a request header.

        Format: `vox_mgmt_<random>`

````