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

# Manage IP whitelist

> Manage the IP whitelist for a datacenter subaccount. All four operations share this endpoint via the required `type` query parameter.

**Operations and required permissions:**
- `get` — list current IPs (`datacenter_shared:read` or `datacenter_dedicated:read`)
- `add` — append IPs without removing existing ones (`datacenter_shared:write` or `datacenter_dedicated:write`)
- `set` — replace the entire whitelist (`datacenter_shared:write` or `datacenter_dedicated:write`)
- `remove` — delete specific IPs (`datacenter_shared:delete` or `datacenter_dedicated:delete`)

**IP label format:** For `add` and `set`, each `ip[]` value may include a label prefix separated by a colon: `ip[]=Office:1.2.3.4`. Everything before the last colon is the label; the last segment is the IP.

**Rate limit:** Mutations (`add`, `set`, `remove`) are limited to 1 request per 30 minutes per subaccount.

**Propagation:** After a successful mutation, allow up to 10 minutes for IPs to synchronize across all proxies.



## OpenAPI

````yaml /openapi-account.json get /v4/account/{subAccountId}/datacenter_shared/whitelist
openapi: 3.0.3
info:
  title: ProxyScrape Account API
  description: Account API — authenticate with the api-token header.
  version: 1.0.0
servers:
  - url: https://api.proxyscrape.com
    description: ProxyScrape API
security:
  - apiToken: []
tags:
  - name: API key management
    description: Create, list, update, regenerate, and revoke API keys
  - name: Subaccounts
    description: List subaccounts and manage preferences
  - name: Datacenter
    description: 'Datacenter shared and dedicated: overview, proxy list, usage, whitelist'
  - name: Residential
    description: 'Residential (bandwidth): overview, subusers, usage'
  - name: Residential unlimited
    description: 'Residential unlimited: overview, statistics, password'
  - name: SERP API
    description: 'SERP API: overview, subusers, search'
  - name: API ordering
    description: >-
      Place wallet-paid orders and read the wallet balance via the headless API
      ordering surface.
paths:
  /v4/account/{subAccountId}/datacenter_shared/whitelist:
    get:
      tags:
        - Datacenter
      summary: Manage IP whitelist
      description: >-
        Manage the IP whitelist for a datacenter subaccount. All four operations
        share this endpoint via the required `type` query parameter.


        **Operations and required permissions:**

        - `get` — list current IPs (`datacenter_shared:read` or
        `datacenter_dedicated:read`)

        - `add` — append IPs without removing existing ones
        (`datacenter_shared:write` or `datacenter_dedicated:write`)

        - `set` — replace the entire whitelist (`datacenter_shared:write` or
        `datacenter_dedicated:write`)

        - `remove` — delete specific IPs (`datacenter_shared:delete` or
        `datacenter_dedicated:delete`)


        **IP label format:** For `add` and `set`, each `ip[]` value may include
        a label prefix separated by a colon: `ip[]=Office:1.2.3.4`. Everything
        before the last colon is the label; the last segment is the IP.


        **Rate limit:** Mutations (`add`, `set`, `remove`) are limited to 1
        request per 30 minutes per subaccount.


        **Propagation:** After a successful mutation, allow up to 10 minutes for
        IPs to synchronize across all proxies.
      operationId: manageWhitelistV4
      parameters:
        - name: subAccountId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: type
          in: query
          required: true
          description: >-
            Operation to perform: `get` reads the current whitelist; `add`
            appends IPs to the existing list; `set` replaces the entire
            whitelist; `remove` deletes specific IPs.
          schema:
            type: string
            enum:
              - get
              - add
              - remove
              - set
        - name: ip[]
          in: query
          description: >-
            One or more public IPv4 addresses to add, set, or remove. Required
            for `add`, `set`, and `remove`. Each value may include an optional
            label prefix separated by a colon — e.g. `Office:1.2.3.4` sets the
            label "Office" for that IP. Cannot exceed the account's `maxips`
            limit.
          schema:
            type: array
            items:
              type: string
            example:
              - Office:1.2.3.4
              - 5.6.7.8
        - name: labels
          in: query
          description: >-
            When present (any value), the `get` response includes a `labels`
            object mapping each whitelisted IP to its assigned label. Has no
            effect for other operation types.
          schema:
            type: string
      responses:
        '200':
          description: Operation succeeded. Response shape differs by `type`.
          content:
            application/json:
              schema:
                oneOf:
                  - title: Get response (type=get)
                    type: object
                    required:
                      - status
                      - maxips
                      - whitelisted
                    properties:
                      status:
                        type: string
                        example: ok
                      maxips:
                        type: integer
                        description: >-
                          Maximum number of IPs this account is allowed to
                          whitelist.
                        example: 3
                      whitelisted:
                        type: array
                        description: Currently whitelisted IP addresses.
                        items:
                          type: string
                        example:
                          - 1.2.3.4
                          - 5.6.7.8
                      labels:
                        type: object
                        description: >-
                          Present only when the `labels` query parameter is
                          included. Maps each whitelisted IP to its label; IPs
                          without a label have an empty string value.
                        additionalProperties:
                          type: string
                        example:
                          1.2.3.4: Office
                          5.6.7.8: ''
                  - title: Mutation response (type=add, set, remove)
                    type: object
                    required:
                      - status
                      - info
                    properties:
                      status:
                        type: string
                        example: ok
                      info:
                        type: string
                        description: Human-readable confirmation message.
                        example: >-
                          IP(s) are now whitelisted. Please allow up to 10
                          minutes for the IPs to synchronize across all proxies.
        '400':
          description: >-
            Bad request. Causes: missing or invalid `type`; invalid or private
            IPv4 address; IP count would exceed the account's `maxips` limit; IP
            already authorized on a different parent account (`add` only); IP
            already whitelisted by another active trial account (trial accounts
            only).
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: bad request
                  info:
                    type: string
                    example: >-
                      One or more IP addresses you tried to whitelist are not a
                      valid IPv4.
        '401':
          description: >-
            Unauthorized. The subaccount's subscription is expired or the
            account is suspended.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: unauthorized
                  info:
                    type: string
                    example: Your subscription is expired.
        '429':
          description: >-
            Rate limited. Whitelist mutations are limited to 1 request per 30
            minutes per subaccount.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: too many requests
                  info:
                    type: string
                    example: You are making too many authentication requests
        '500':
          description: Internal server error during whitelist sync.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: internal server error
      security:
        - apiToken: []
components:
  securitySchemes:
    apiToken:
      type: apiKey
      in: header
      name: api-token
      description: >-
        API key. Create and manage keys at /v4/account/api-keys or in the
        dashboard.

````