---
title: "Assign Role"
description: "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."
stack: "Enterprise Stack (commercial) — version 0.21.0"
stack_version: "0.21.0"
stack_comparison: https://docs.walt.id/community-vs-enterprise.md
canonical_url: https://docs.walt.id/enterprise-stack/administration/access-and-permissions/accounts/assign-role
generated: 2026-07-20
---
# Assign Role

[Roles](https://docs.walt.id/enterprise-stack/administration/access-and-permissions/roles/overview.md) are a set of [permissions](https://docs.walt.id/enterprise-stack/administration/access-and-permissions/permissions/overview.md) 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](https://docs.walt.id/enterprise-stack/administration/access-and-permissions/roles/create-roles.md).

## Assigning a Role to an Account

**Option: CURL**

Endpoint:`/v1/{target}/roles-api/roles/account/assign`

**Example Request**

```bash
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**

```json
{
  "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 named `test`, your default Base URL will
  be `test.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.
