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

# Ban customer

> Bans a customer for a specified duration. While banned, the customer cannot connect to or interact with the Customer Chat API within your organization.

**Required scopes:** `banlist_write`

**Note:** At least one of `ip` and `customer_id` is required. If `ip` is provided, it cannot match the license's `monitoring.ip_mask` property.


## OpenAPI

````yaml /api/configuration/v3.7/openapi.json post /action/ban_customer
openapi: 3.1.0
info:
  title: Configuration API
  version: v3.7
servers:
  - url: https://api.livechatinc.com/v3.7/configuration
security:
  - PersonalAccessToken: []
  - OAuth2BearerToken: []
paths:
  /action/ban_customer:
    post:
      tags:
        - Customer bans
      summary: Ban customer
      description: >-
        Bans a customer for a specified duration. While banned, the customer
        cannot connect to or interact with the Customer Chat API within your
        organization.
      operationId: ban-customer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BanCustomerRequest'
            example:
              ip: 192.168.1.1
              seconds: 3600
              customer_id: b7eff798-f8df-4364-8059-649c35c9ed0c
      responses:
        '200':
          description: Customer banned successfully.
components:
  schemas:
    BanCustomerRequest:
      type: object
      required:
        - seconds
      properties:
        seconds:
          type: integer
          description: The ban duration in seconds. Must be a positive integer.
        ip:
          type: string
          description: >-
            The customer's IP address. At least one of `ip` and `customer_id` is
            required.
        customer_id:
          type: string
          description: The customer ID. At least one of `ip` and `customer_id` is required.
  securitySchemes:
    PersonalAccessToken:
      type: http
      scheme: basic
      description: >-
        Use your `account ID` as the username and your personal access token
        (PAT) as the password, or pass a Base64-encoded value directly in the
        Authorization header. For more information, see the <a
        href="/authentication/personal-access-tokens">personal access tokens
        guide</a>.
    OAuth2BearerToken:
      type: http
      scheme: bearer
      description: Authenticate using an OAuth 2.0 Bearer token.
      x-example: us-south1:MQraNrGCsoJvtxD7KNJQB1kM3d5

````