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.
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) |
| 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. |
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"
}
{
"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"
}
}
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": "***"
}
{
"Response": {
"Error": {
"Code": "ResourceNotFound",
"Message": "The resource does not exist"
},
"RequestId": "df1d71c3-2389-4f04-9db8-36108be0c915"
}
}
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": "***"
}
{
"Response": {
"Error": {
"Code": "InvalidParameterValue.OrgNameRepeat",
"Message": "Organization name must be unique"
},
"RequestId": "4847e307-e6ac-47b1-b6f8-bea39a66c8a9"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
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. |
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback