tencent cloud

APIs

AddOrganization

Download
Focus Mode
Font Size
Last updated: 2026-10-26 11:48:53

1. API Description

Domain name for API request: iss.intl.tencentcloudapi.com.

Used to add an organization.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: AddOrganization.
Version Yes String Common Params. The value used for this API: 2023-05-17.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
Name Yes String Organization name. Only Chinese, English, digits, spaces, Chinese and English parentheses, underscores (_), and hyphens (-) are supported. The length cannot exceed 64 characters, and the organization name must be unique.
ParentId Yes String Organization parent node ID (obtain from the DescribeOrganization API; enter 0 for the root organization)

3. Output Parameters

Parameter Name Type Description
Data AddOrgData Interface return data for adding an organizational unit
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Success 1

Input Example

POST / HTTP/1.1
Host: iss.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: AddOrganization
<Common request parameters>

{
    "Name": "Cloud api3-5",
    "ParentId": "0"
}

Output Example

{
    "Response": {
        "Data": {
            "AppId": 13000000001,
            "OrganizationId": "193",
            "Level": 1,
            "Name": "Cloud api 3-5",
            "Online": 0,
            "ParentId": "0",
            "ParentIds": "0",
            "Total": 0
        },
        "RequestId": "6243deef-a87a-4d5e-8c71-2ca237520df7"
    }
}

Example2 Parent organization does not exist error

Input Example

POST / HTTP/1.1
Host: iss.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: AddOrganization
<Common request parameters>

{
    "Name": "Cloud api3-6",
    "ParentId": "***"
}

Output Example

{
    "Response": {
        "Error": {
            "Code": "ResourceNotFound",
            "Message": "The resource does not exist"
        },
        "RequestId": "df1d71c3-2389-4f04-9db8-36108be0c915"
    }
}

Example3 Duplicate Organization Name Error

Input Example

POST / HTTP/1.1
Host: iss.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: AddOrganization
<Common request parameters>

{
    "Name": "Cloud api 3-5",
    "ParentId": "***"
}

Output Example

{
    "Response": {
        "Error": {
            "Code": "InvalidParameterValue.OrgNameRepeat",
            "Message": "Organization name must be unique"
        },
        "RequestId": "4847e307-e6ac-47b1-b6f8-bea39a66c8a9"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation Operation failed
InvalidParameter Invalid input parameter
InvalidParameterValue.InvalidOrgName Organization name is empty or incorrect.
InvalidParameterValue.OrgNameRepeat Organization name must be unique
OperationDenied.ExceededMaximumDepth Failed to add the organization tree. The maximum depth of the organization tree is exceeded.
ResourceNotFound Resource does not exist.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback