> For the complete documentation index, see [llms.txt](https://kitehouse.co.uk/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kitehouse.co.uk/docs/api-reference/rbac.md).

# RBAC

## GET /rbac/roles

> Get all available permissions and system role definitions.

```json
{"openapi":"3.0.3","info":{"title":"Incident Tracker API","version":"1.0.0"},"servers":[{"url":"https://api.kitehouse.co.uk"}],"paths":{"/rbac/roles":{"get":{"tags":["RBAC"],"description":"Get all available permissions and system role definitions.","responses":{"200":{"description":"Default Response"}}}}}}
```

## GET /rbac/roles/{siteId}

> List all roles configured for a site.

```json
{"openapi":"3.0.3","info":{"title":"Incident Tracker API","version":"1.0.0"},"servers":[{"url":"https://api.kitehouse.co.uk"}],"paths":{"/rbac/roles/{siteId}":{"get":{"tags":["RBAC"],"description":"List all roles configured for a site.","parameters":[{"schema":{"type":"string"},"in":"path","name":"siteId","required":true}],"responses":{"200":{"description":"Default Response"}}}}}}
```

## POST /rbac/roles/{siteId}

> Create a new predefined role for a site.

```json
{"openapi":"3.0.3","info":{"title":"Incident Tracker API","version":"1.0.0"},"servers":[{"url":"https://api.kitehouse.co.uk"}],"paths":{"/rbac/roles/{siteId}":{"post":{"tags":["RBAC"],"description":"Create a new predefined role for a site.","parameters":[{"schema":{"type":"string"},"in":"path","name":"siteId","required":true}],"responses":{"200":{"description":"Default Response"}}}}}}
```

## GET /rbac/roles/{siteId}/me

> Get the current user's role and permissions for a site.

```json
{"openapi":"3.0.3","info":{"title":"Incident Tracker API","version":"1.0.0"},"servers":[{"url":"https://api.kitehouse.co.uk"}],"paths":{"/rbac/roles/{siteId}/me":{"get":{"tags":["RBAC"],"description":"Get the current user's role and permissions for a site.","parameters":[{"schema":{"type":"string"},"in":"path","name":"siteId","required":true}],"responses":{"200":{"description":"Default Response"}}}}}}
```

## DELETE /rbac/roles/{siteId}/{roleId}

> Delete a custom role from a site.

```json
{"openapi":"3.0.3","info":{"title":"Incident Tracker API","version":"1.0.0"},"servers":[{"url":"https://api.kitehouse.co.uk"}],"paths":{"/rbac/roles/{siteId}/{roleId}":{"delete":{"tags":["RBAC"],"description":"Delete a custom role from a site.","parameters":[{"schema":{"type":"string"},"in":"path","name":"siteId","required":true},{"schema":{"type":"string"},"in":"path","name":"roleId","required":true}],"responses":{"200":{"description":"Default Response"}}}}}}
```

## PATCH /rbac/roles/{siteId}/{roleId}

> Update an existing role for a site.

```json
{"openapi":"3.0.3","info":{"title":"Incident Tracker API","version":"1.0.0"},"servers":[{"url":"https://api.kitehouse.co.uk"}],"paths":{"/rbac/roles/{siteId}/{roleId}":{"patch":{"tags":["RBAC"],"description":"Update an existing role for a site.","parameters":[{"schema":{"type":"string"},"in":"path","name":"siteId","required":true},{"schema":{"type":"string"},"in":"path","name":"roleId","required":true}],"responses":{"200":{"description":"Default Response"}}}}}}
```

## PUT /rbac/roles/{siteId}/{staffId}

> Update a staff member role assignment.

```json
{"openapi":"3.0.3","info":{"title":"Incident Tracker API","version":"1.0.0"},"servers":[{"url":"https://api.kitehouse.co.uk"}],"paths":{"/rbac/roles/{siteId}/{staffId}":{"put":{"tags":["RBAC"],"description":"Update a staff member role assignment.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["role_ids"],"properties":{"role_ids":{"type":"array","items":{"type":"string"}}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"siteId","required":true},{"schema":{"type":"string"},"in":"path","name":"staffId","required":true}],"responses":{"200":{"description":"Default Response"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://kitehouse.co.uk/docs/api-reference/rbac.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
