Add an account membership for a user

Requires the USER.MORTAL.UPDATE permission.

Authentication

X-API-KEYstring
API Key authentication via header
OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

versionstringRequiredDefaults to 1
version
resourceIdstringRequiredDefaults to
The ID of the resource for which the action is posted.

Headers

x-platform-idstringOptional
Platform ID.

Request

This endpoint expects an object.
account_idstringRequired
The id of the account that this membership is for
typeenumRequired
The type of this membership
Allowed values:
role_idslist of stringsRequired
The roles assigned through this membership
accountobject or nullOptional
The account that this membership is for
account_referencestring or nullOptionalDeprecated
The reference of the account that this membership is for
environmentstring or nullOptionalDeprecated
The environment that this membership is for
roleslist of objects or nullOptionalDeprecated
The roles that belong to this membership

Response

Created
account_idstring
The id of the account that this membership is for
typeenum
The type of this membership
Allowed values:
role_idslist of strings
The roles assigned through this membership
object_typestring or nullRead-only
idstring or nullRead-only
The id of this account membership
accountobject or null
The account that this membership is for
account_referencestring or nullDeprecated
The reference of the account that this membership is for
environmentstring or nullDeprecated
The environment that this membership is for
roleslist of objects or nullDeprecated
The roles that belong to this membership

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
500
Internal Server Error