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

# Post v1audiencecompanies



## OpenAPI

````yaml https://api.comm.com/docs/api.json post /v1/audience/companies
openapi: 3.1.0
info:
  title: Commvoice API
  version: '1'
servers:
  - url: https://api.comm.com/api
    description: Live
security:
  - http: []
paths:
  /v1/audience/companies:
    post:
      tags:
        - Companies
      operationId: audience.companies.store
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 255
                overdraft_enabled:
                  type: boolean
                overdraft_limit:
                  type: integer
                  minimum: 0
              required:
                - name
                - overdraft_enabled
      responses:
        '201':
          description: '`CompanyResource`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CompanyResource'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    CompanyResource:
      type: object
      properties:
        id:
          type: string
        team_id:
          type: string
        name:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
        is_active:
          type: boolean
        overdraft_enabled:
          type: boolean
        overdraft_limit:
          type: integer
        client_balance:
          type: string
        vendor_balance:
          type: string
        provider_balance:
          type:
            - number
            - 'null'
        provider_balance_updated_at:
          type: string
        balance_checker:
          type: string
        endpoints_count:
          type: string
        sms_routes_count:
          type: string
        balance_checker_data:
          $ref: '#/components/schemas/BalanceCheckerData'
          description: balance_checker_data
        balance_email:
          type: string
        links:
          type: array
          items:
            type: string
          minItems: 0
          maxItems: 0
          additionalItems: false
      required:
        - id
        - team_id
        - name
        - created_at
        - updated_at
        - is_active
        - overdraft_enabled
        - overdraft_limit
        - provider_balance
        - provider_balance_updated_at
        - balance_checker
        - endpoints_count
        - sms_routes_count
        - balance_email
        - links
      title: CompanyResource
    BalanceCheckerData:
      type: object
      properties:
        balance_checker:
          $ref: '#/components/schemas/BalanceCheckerTypeEnum'
        balance_regex:
          type:
            - string
            - 'null'
        api_auth_type:
          anyOf:
            - $ref: '#/components/schemas/AuthTypeEnum'
            - type: 'null'
        api_auth_data:
          type:
            - array
            - 'null'
          items:
            type: string
        balance_endpoint_url:
          type:
            - string
            - 'null'
          format: uri
        balance_endpoint_method:
          type:
            - string
            - 'null'
          enum:
            - GET
            - POST
        balance_json_path:
          type:
            - string
            - 'null'
        notification_if_no_data_x_days:
          type:
            - integer
            - 'null'
          minimum: 1
      required:
        - balance_checker
        - balance_regex
        - api_auth_type
        - api_auth_data
        - balance_endpoint_url
        - balance_endpoint_method
        - balance_json_path
        - notification_if_no_data_x_days
      title: BalanceCheckerData
    BalanceCheckerTypeEnum:
      type: string
      enum:
        - api
        - email
        - none
      title: BalanceCheckerTypeEnum
    AuthTypeEnum:
      type: string
      enum:
        - none
        - basic
        - bearer
        - custom
      title: AuthTypeEnum
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    http:
      type: http
      scheme: bearer
      bearerFormat: JWT

````