All Products
Search
Document Center

Resource Management:InviteAccountToResourceDirectory

Last Updated:Aug 28, 2026

Invites an account to join a resource directory.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

TargetEntity

string

Yes

The ID or logon email address of the account to invite.

someone@example.com

TargetType

string

Yes

The type of the invited account. Valid values:

  • Account: the ID of the account.

  • Email: the logon email address of the account.

Email

Note

string

No

The description of the invitation.

Maximum length: 1,024 characters.

Welcome

Tag

array<object>

No

The tags.

object

No

The tags.

Key

string

No

The tag key.

k1

Value

string

No

The tag value.

v1

ParentFolderId

string

No

The ID of the parent folder.

r-b1****

Response elements

Element

Type

Description

Example

object

The returned result.

RequestId

string

The request ID.

9B34724D-54B0-4A51-B34D-4512372FE1BE

Handshake

object

The invitation details.

Status

string

The status of the invitation. Valid values:

  • Pending

  • Accepted

  • Cancelled

  • Declined

  • Expired

Pending

ExpireTime

string

The time when the invitation expires, in UTC.

2018-08-24T09:55:41Z

ResourceDirectoryId

string

The resource directory ID.

rd-abcdef****

CreateTime

string

The time when the invitation was created, in UTC.

2018-08-10T09:55:41Z

Note

string

The description of the invitation.

Welcome

TargetEntity

string

The ID or logon email address of the invited account.

someone@example.com

MasterAccountId

string

The management account ID of the resource directory.

172841235500****

MasterAccountName

string

The management account name of the resource directory.

Alice

ModifyTime

string

The time when the invitation was last modified, in UTC.

2018-08-10T09:55:41Z

TargetType

string

The type of the invited account. Valid values:

  • Account: the ID of the account.

  • Email: the logon email address of the account.

Email

HandshakeId

string

The invitation ID.

h-ycm4rp****

Examples

Success response

JSON format

{
  "RequestId": "9B34724D-54B0-4A51-B34D-4512372FE1BE",
  "Handshake": {
    "Status": "Pending",
    "ExpireTime": "2018-08-24T09:55:41Z",
    "ResourceDirectoryId": "rd-abcdef****",
    "CreateTime": "2018-08-10T09:55:41Z",
    "Note": "Welcome\n",
    "TargetEntity": "someone@example.com",
    "MasterAccountId": "172841235500****",
    "MasterAccountName": "Alice",
    "ModifyTime": "2018-08-10T09:55:41Z",
    "TargetType": "Email",
    "HandshakeId": "h-ycm4rp****"
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 MissingParameter.TargetEntity You must specify TargetEntity.
400 InvalidParameter.TargetEntity The TargetEntity is invalid.
400 MissingParameter.TargetType You must specify TargetType.
400 InvalidParameter.TargetType The TargetType is invalid.
400 InvalidParameter.Note.Length The length of the invitation note exceeds the limit.
400 InvalidParameter.Note The Note is invalid.
400 InvalidParameter.ParentFolderId The ParentFolderId is invalid.
400 InvalidParameter.AccountId The AccountId is invalid.
404 EntityNotExists.ResourceDirectory The resource directory for the account is not enabled. We recommend that you first enable the resource directory for the account.
404 EntityNotExists.Folder The resource directory folder does not exist.
409 LimitExceeded.Account The maximum number of member accounts in a resource directory exceeds the limit.
409 LimitExceeded.InvitationRate The number of invitations sent exceeds the limit.
409 EntityAlreadyExists.Handshake Handshakes with the same target entity already exist.
409 Invalid.AccountType The specified profile type of account is invalid.
409 EntityAlreadyExists.ResourceDir.Account This resource directory account already exists.
409 LimitExceeded.Invitation.InvalidTarget The maximum number of invalid targets that can be invited by a single account is exceeded.
409 NotSupport.AccountInAnotherResourceDirectory The invited account already belongs to another resource directory. To continue, remove the account from the other resource directory.
409 LegalEntityMismatch The account does not have the same legal entity as the management account.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.