> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.houseofapps.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.houseofapps.ai/_mcp/server.

# Roles and Permissions

> How roles and permissions work in House of Apps and how they apply to API requests

Every member of a House of Apps organization has one role. A role is a named set of permissions that controls what the member can see and do in the app, such as viewing leads or managing ticket settings. Roles are managed under **Administration → Roles & Permissions**.

## How roles apply to API requests

Requests authenticated with a [license key](/api-reference/authentication) act on behalf of the organization, not an individual member. They are not limited by any role, so they can read and change every record in the organization. Changes made through the API appear in activity history as `api@<organization>.com`.

Because a license key has full access to your organization, store it securely and only use it in integrations you trust.

## Permissions

Each permission has an `id`, `name`, `code` (for example `leads_management.view`), `category`, and `description`. The list of permissions is fixed by House of Apps; you combine them into roles.

| Method | Endpoint                                       | Description             |
| ------ | ---------------------------------------------- | ----------------------- |
| `GET`  | `/v1/integrations/permissions`                 | List all permissions    |
| `GET`  | `/v1/integrations/permissions/{permission_id}` | Get a single permission |

## Managing roles

| Method   | Endpoint                           | Description                                                                                              |
| -------- | ---------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `GET`    | `/v1/integrations/roles`           | List roles. Supports `search`, `page`, and `page_size`.                                                  |
| `GET`    | `/v1/integrations/roles/{role_id}` | Get a role and its permissions                                                                           |
| `POST`   | `/v1/integrations/roles`           | Create a role with `name`, `description`, and `permission_ids`                                           |
| `PUT`    | `/v1/integrations/roles/{role_id}` | Update a role. Sending `permission_ids` replaces the role's permissions; omit it to keep them unchanged. |
| `DELETE` | `/v1/integrations/roles/{role_id}` | Delete a role                                                                                            |

```json
POST /v1/integrations/roles
{
  "name": "Sales Rep",
  "description": "Works assigned leads",
  "permission_ids": ["<permission_id>", "<permission_id>"]
}
```

A role cannot be deleted while it is assigned to members; the API responds with `403`. Role names must be unique within your organization (`409`), and unknown permission IDs are rejected with `400`.

## Assigning roles

| Method  | Endpoint                               | Body                                                |
| ------- | -------------------------------------- | --------------------------------------------------- |
| `PATCH` | `/v1/integrations/users/{user_id}`     | `{"role_id": "<role_id>"}`                          |
| `PATCH` | `/v1/integrations/invites/{invite_id}` | `{"role_id": "<role_id>"}` for a pending invitation |