All Products
Search
Document Center

Drive and Photo Service:CreateDomain

Last Updated:Apr 23, 2026

Creates a domain.

Operation description

Use the parent-child domain feature to implement custom operations on PDS or apply fine-grained controls to tenants. For more information, contact the official DingTalk group: 23146118.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST /v2/domain/create HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

The request body.

parent_domain_id

string

No

The ID of the parent domain. Set this parameter to create a child domain. This parameter is optional. For information about implementing custom operations, contact PDS customer service.

bj1

domain_name

string

Yes

The name of the domain.

cloud drive

description

string

No

The description of the domain.

cloud drive dev

init_drive_enable

boolean

No

Specifies whether to enable a default drive for users. If set to true, a drive is automatically provisioned for each user upon their first login. The default value is false.

true

init_drive_size

integer

No

This parameter is required if init_drive_enable is set to true. The size of the default drive for new users, in bytes. The default value is 0, which creates a drive with zero capacity, preventing users from uploading files. To provide initial storage, you must set this parameter. A value of -1 indicates an unlimited size.

1073741824

user_count_quota

integer

No

The user count quota for the domain. This specifies the maximum number of users that can be created. A value of 0 indicates no limit.

50

size_quota

integer

No

The total storage quota for the domain, in bytes. This value represents the combined storage limit for all drives within the domain. A value of 0 indicates no limit.

1099511627776

store_redundancy_type

string

No

The storage redundancy type. Valid values:

  • LRS: Locally Redundant Storage

  • ZRS: Zone-Redundant Storage

Response elements

Element

Type

Description

Example

Domain

The details of the created domain.

Examples

Success response

JSON format

{
  "parent_domain_id": "bj1",
  "domain_id": "bj2",
  "domain_name": "pdsdomain",
  "description": "my domain",
  "init_drive_enable": true,
  "init_drive_size": 1073741824,
  "updated_at": "2019-08-20T06:51:27.292Z",
  "created_at": "2019-08-20T06:51:27.292Z",
  "size_quota": 1099511627776,
  "size_quota_used": 1099511627776,
  "user_count_quota": 50,
  "status": 1,
  "used_size": 1099511627776,
  "published_app_access_strategy": {
    "effect": "deny",
    "except_app_id_list": [
      "8ovxCTRUDdbpVWBP"
    ]
  },
  "sharable": false,
  "data_hash_name": "sha1",
  "store_redundancy_type": "LRS"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.