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

# Bulk operations on clients

> Perform bulk operations (update or delete) on multiple clients



## OpenAPI

````yaml /api-reference/cx/swagger.json post /clients/_bulk
openapi: 3.0.0
info:
  description: CX API.
  title: CX API
  contact:
    name: API Support
    url: https://stax.ai
    email: support@stax.ai
  version: '1.0'
servers:
  - url: https://api.cx.stax.ai
security: []
paths:
  /clients/_bulk:
    post:
      tags:
        - clients
      summary: Bulk operations on clients
      description: Perform bulk operations (update or delete) on multiple clients
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/pkg_routes_clients.BulkRequest'
        description: Bulk operation request
        required: true
      responses:
        '200':
          description: Bulk operation result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pkg_routes_clients.BulkClientResponse'
        '400':
          description: >-
            Bad request - invalid request body, no IDs, no actions, or an
            assignee who isn't a user on the team
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '404':
          description: No clients updated or no access
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
      security:
        - ApiKeyAuth: []
components:
  schemas:
    pkg_routes_clients.BulkRequest:
      type: object
      properties:
        actions:
          type: array
          items:
            $ref: '#/components/schemas/pkg_routes_clients.BulkAction'
        ids:
          type: array
          items:
            type: string
        type:
          type: string
    pkg_routes_clients.BulkClientResponse:
      type: object
      properties:
        ok:
          type: boolean
        updated:
          description: How many of the requested companies the action changed (ENG-10060).
          type: integer
        warning:
          description: >-
            Set when the change landed but a Terminated company's invitations
            could neither be

            closed nor queued to be (ENG-10006).
          type: string
    pkg_routes_clients.BulkAction:
      type: object
      properties:
        label:
          type: string
        prop:
          type: string
        value: {}
  securitySchemes:
    ApiKeyAuth:
      description: CX API key. Create one in CX under Settings → Advanced → API Keys.
      in: header
      name: x-api-key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.