CreateProjectMember - Add project members

Updated at:

Applicable editions

Central edition, Region edition

Service endpoint and authorization

Product

Resource

Permission

Project Collaboration

Project members

Read/Write

Request syntax

Central edition

POST https://{domain}/oapi/v1/projex/organizations/{organizationId}/projects/{id}/members

Region edition

POST https://{domain}/oapi/v1/projex/projects/{id}/members

Request header

Parameter

Type

Required

Description

Example

x-yunxiao-token

string

Yes

A personal access token.

pt-0fh3****0fbG_35af****0484

Request parameters

Parameter

Type

In

Required

Description

Example

id

string

path

Yes

The project's unique identifier.

589c53d622cc8521793e08****

organizationId

string

path

  • Yes (Central edition)

  • No (Region edition)

The organization ID.

-

object

body

No

operatorId

string

body

No

The operator's user ID. This parameter is ignored when authenticating with a personal access token.

user-xxx

roleId

string

body

Yes

The role ID to assign.

project.participant

userIds

array[string]

body

Yes

An array of user IDs to add as project members.

["11234"]

Request examples

Central edition

curl -X 'POST' \
  'https://{domain}/oapi/v1/projex/organizations/{organizationId}/projects/589c53d622cc8521793e08****/members' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
  --data '
    {
        "operatorId": "user-xxx",
        "roleId": "project.participant",
        "userIds": ["11234"]
    }'

Region edition

curl -X 'POST' \
  'https://{domain}/oapi/v1/projex/projects/589c53d622cc8521793e08****/members' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
  --data '
    {
        "operatorId": "user-xxx",
        "roleId": "project.participant",
        "userIds": ["11234"]
    }'

Response parameters

None.

Error codes

For API error codes, see the Error Code Center.