> ## Documentation Index
> Fetch the complete documentation index at: https://gcore-doc-1256a.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Set client balancer settings

> Set regions that will be used for content delivery for a specific client.



## OpenAPI

````yaml /api-reference/services_docs_mintlify/cdn_reseller_api.yaml post /cdn/admin/clients/{client_id}
openapi: 3.1.0
info:
  title: Gcore OpenAPI – CDN Reseller API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: 374b36dbeac8
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: Account
    description: Information about CDN product settings in your account.
  - name: CDN service
    description: Information about the current state of CDN service in your account.
  - name: Features
    description: Information about free and paid features available for you account.
  - name: Balancer
    description: >-
      Balancer allows choosing CDN server locations that will be used for
      content delivery.


      To activate balancer, [set client’s balancer
      settings](/api-reference/cdn-resellers/balancer/set-client-balancer-settings).
  - name: CDN activity logs
    description: |-
      Get the history of users requests to CDN.
      It contains requests made both via the API and via the control panel.

      The following methods are not tracked in the activity logs:
      - HEAD
      - OPTIONS
  - name: Logs uploader
    description: Manage logs uploader configs for reseller accounts.
  - name: Statistics
    description: Statistics CDN usage and paid features usage.
  - name: Origin shielding
    description: >-
      Origin shielding helps protect your origin server from being overloaded
      with requests from multiple CDN servers.

      The option accumulates all CDN server requests at a special server called
      a shield or precache server.


      When shielding is enabled, only one precache server communicates with the
      origin host, not the entire CDN.
paths:
  /cdn/admin/clients/{client_id}:
    post:
      tags:
        - Balancer
      summary: Set client balancer settings
      description: >-
        Set regions that will be used for content delivery for a specific
        client.
      operationId: set-client-balancer-settings
      parameters:
        - $ref: '#/components/parameters/path_client_id'
      requestBody:
        $ref: '#/components/requestBodies/SetClientsBalancerSettings'
      responses:
        '204':
          description: Successful.
        '400':
          $ref: '#/components/responses/RegionNotFound'
        '409':
          $ref: '#/components/responses/RegionIsAbsent'
components:
  parameters:
    path_client_id:
      name: client_id
      in: path
      required: true
      schema:
        allOf:
          - $ref: '#/components/schemas/body_response_client_ID'
  requestBodies:
    SetClientsBalancerSettings:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SetClientsBalancerSettings'
          examples:
            default:
              $ref: '#/components/examples/ClientSettingsDetails'
  responses:
    RegionNotFound:
      description: Region is not found in regions list.
    RegionIsAbsent:
      description: Some required billing regions are missing.
  schemas:
    body_response_client_ID:
      type: integer
      description: Client account ID.
    SetClientsBalancerSettings:
      type: object
      properties:
        is_in:
          allOf:
            - $ref: >-
                #/components/schemas/body_response_balancer_regions_settings_IsIn
        region_list:
          allOf:
            - $ref: >-
                #/components/schemas/body_response_balancer_regions_settings_RegionList
      required:
        - is_in
        - region_list
    body_response_balancer_regions_settings_IsIn:
      type: boolean
      description: >-
        Defines whether regions are used for content delivery for a client or
        not.


        Possible values:

        - **true** - Region is used for content delivery.

        - **false** - Region is not used for content delivery.
    body_response_balancer_regions_settings_RegionList:
      type: array
      items:
        type: integer
      description: >-
        List of region IDs.


        If you specified regions used for content delivery, the regions IDs list
        must not contain the ID of the default location handler region.


        If you specified regions not used for content delivery, the regions IDs
        list must contain the ID of the default location handler region.
  examples:
    ClientSettingsDetails:
      value:
        is_in: true
        region_list:
          - 1
          - 2
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234$abcdef`
      type: apiKey
      in: header
      name: Authorization

````