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

# 建立域名白名单/黑名单

> Add domain to Zone whitelist or blacklist

<Warning> **Warning:** This API can modify your account settings, damage your operations or incur charges.</Warning>

<Tip>
  将您的 API 令牌粘贴到身份验证字段。要获得令牌，创建账户并了解如何生成令牌

  [Create an account](https://brightdata.com/?hs_signup=1\&utm_source=docs\&utm_campaign=playground), [generate a token](/cn/api-reference/unlocker/api_token)
</Tip>


## OpenAPI

````yaml POST /zone/domain_perm
openapi: 3.0.1
info:
  title: Brightdata API
  description: >-
    Integrate Bright Data APIs to your pipeline and secure high-end scraping
    precision
  version: 1.0.0
servers:
  - url: https://api.brightdata.com
security:
  - bearerAuth: []
paths:
  /zone/domain_perm:
    post:
      description: Add domain to Zone whitelist or blacklist
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ZoneAndDomain'
      responses:
        '201':
          description: OK
components:
  schemas:
    ZoneAndDomain:
      required:
        - zone
        - type
      type: object
      properties:
        zone:
          description: Zone name
          type: string
        type:
          description: >-
            `whitelist` to whitelist domain(s), `blacklist` to blacklist
            domain(s)
          type: string
          enum:
            - whitelist
            - blacklist
        domain:
          description: space separated list of domains
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````