> ## 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.

# Patch v1audiencecompanies toggle active



## OpenAPI

````yaml https://api.comm.com/docs/api.json patch /v1/audience/companies/{company}/toggle-active
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/{company}/toggle-active:
    patch:
      tags:
        - Companies
      operationId: companies.toggleActiveState
      parameters:
        - name: company
          in: path
          required: true
          description: The company ID
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: '`CompanyResource`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CompanyResource'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
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
    ModelNotFoundException:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
  securitySchemes:
    http:
      type: http
      scheme: bearer
      bearerFormat: JWT

````