Assign Role
Roles are a set of permissions that can be assigned to Accounts and API-Keys. If you don't have a role yet, you can learn how to create one here.
Assigning a Role to an Account
CURL
Endpoint:/v1/{target}/roles-api/roles/account/assign
Example Request
curl -X 'POST' \
'https://{orgID}.enterprise-sandbox.waltid.dev/v1/{target}/roles-api/roles/account/assign' \
-H 'accept: */*' \
-H 'Authorization: Bearer {yourToken}' \
-H 'Content-Type: application/json' \
-d '
{
"assigneeEmail": "max.mustermann@example.org"
}'
Body
{
"assigneeEmail": "max.mustermann@example.org"
}
Path Parameters
orgID
: - When performing operations within an organization, it is essential to use the organization's Base URL or another valid host alias. For example, if your organization is namedtest
, your default Base URL will betest.enterprise-sandbox.walt.dev
when using the sandbox environment.target
: resourceIdentifier - The target indicates the ID of the role to assign to an account. e.g.waltid.admin
Body Parameters
assigneeEmail
: String - Email of the account to assign the role to.
Response Codes
200
- Role assigned successfully.