CreateAppMembers - Add app members

Updated at:

Applicable versions

Centralized version, region version

Service endpoints and authorization

Product

Resource

Required permission

App Delivery

app

read/write

Request syntax

Centralized version

POST https://{domain}/oapi/v1/appstack/organizations/{organizationId}/apps/{appName}/members

Region-based version

POST https://{domain}/oapi/v1/appstack/apps/{appName}/members

Request 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

  • Yes (for centralized version)

  • No (for region-based version)

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, User, Team, Group, and Org.

Member

roleNames

array[string]

body

Yes

A list of roles to assign to the members. Valid values: admin, developer, tester, and operator.

["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

true

Error codes

See the Error Code Center for API error codes.