CreateAppMembers - Add app members
Applicable versions | Centralized version, region version |
Service endpoints and authorization
Get service endpoints: Replace {domain} in the request syntax.
Get the organization ID: Required only for the centralized version. Find it on the basic information page in organization settings.
Product | Resource | Required permission |
App Delivery | app | read/write |
Request syntax
Centralized version
POST https://{domain}/oapi/v1/appstack/organizations/{organizationId}/apps/{appName}/membersRegion-based version
POST https://{domain}/oapi/v1/appstack/apps/{appName}/membersRequest header
Parameter | Type | Required | Description | Example |
x-yunxiao-token | string | Yes | Your personal access token. | pt-0fh3****0fbG_35af****0484 |
Request parameters
Parameter | Type | Location | Required | Description | Example |
appName | string | path | Yes | The app name. | my-demo-app |
organizationId | string | path |
| The organization ID. | ec766e63aee3437d9a51f334d6exe671 |
| - | object | body | No | Contains the members to add and the roles to assign to them. | |
| playerList | array | body | Yes | A list of members to add. | |
| - | object | body | No | A member to add. | |
id | string | body | No | The member ID. | 1c83bd48e254405fb27297ee1fb8xxxx |
type | string | body | No | The type of the member. Valid values: | Member |
roleNames | array[string] | body | Yes | A list of roles to assign to the members. Valid values: | ["admin"] |
Request examples
Centralized version
curl -X 'POST' \
'https://{domain}/oapi/v1/appstack/organizations/ec766e63aee3437d9a51f334d6exe671/apps/my-demo-app/members' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"playerList": [
{
"id": "1c83bd48e254405fb27297ee1fb8xxxx",
"type": "Member"
}
],
"roleNames": ["admin"]
}'Region-based version
curl -X 'POST' \
'https://{domain}/oapi/v1/appstack/apps/my-demo-app/members' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"playerList": [
{
"id": "1c83bd48e254405fb27297ee1fb8xxxx",
"type": "Member"
}
],
"roleNames": ["admin"]
}'Response parameters
Parameter | Type | Description | Example |
- | boolean | Indicates whether the call was successful. | true |
Response example
trueError codes
See the Error Code Center for API error codes.