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

# Policies

API endpoint for retrieving policy information

## GET /api/policies

> List policies

```json
{"openapi":"3.1.0","info":{"title":"ControlBee API","version":"1.0.0"},"tags":[{"name":"Policies","description":"API endpoint for retrieving policy information"}],"servers":[{"url":"https://{organisation}.controlbee.nl","description":"Your organisation's ControlBee environment","variables":{"organisation":{"default":"your-organisation","description":"The name in the address you use to log in to ControlBee"}}}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Create an API token in ControlBee: click your profile picture, choose **Company management** and add a token under **API tokens** on the **General** page. Only users who are allowed to manage the company see this option. See [General and API](https://docs.controlbee.nl/en/profiel/bedrijfsbeheer/algemeen-en-api) in the manual. Send the token as `Authorization: Bearer <token>`."}},"schemas":{"Policy":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"version":{"type":"string"}}}},"responses":{"UnauthorizedResponse":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"ForbiddenErrorResponse":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"NotFoundResponse":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"MethodNotAllowedResponse":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"InternalServerErrorResponse":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}},"paths":{"/api/policies":{"get":{"summary":"List policies","operationId":"getPolicies","tags":["Policies"],"responses":{"200":{"description":"Successful policies response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Policy"}}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenErrorResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"},"405":{"$ref":"#/components/responses/MethodNotAllowedResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}}}}
```

## Upload a policy image

> Uploads an image for use in a policy description. The returned 'url' can be used as the 'src' of an image in policy content. Uploaded images are stored per company and are only served to users of that company. Requires the 'policy.upload' permission.

```json
{"openapi":"3.1.0","info":{"title":"ControlBee API","version":"1.0.0"},"tags":[{"name":"Policies","description":"API endpoint for retrieving policy information"}],"servers":[{"url":"https://{organisation}.controlbee.nl","description":"Your organisation's ControlBee environment","variables":{"organisation":{"default":"your-organisation","description":"The name in the address you use to log in to ControlBee"}}}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Create an API token in ControlBee: click your profile picture, choose **Company management** and add a token under **API tokens** on the **General** page. Only users who are allowed to manage the company see this option. See [General and API](https://docs.controlbee.nl/en/profiel/bedrijfsbeheer/algemeen-en-api) in the manual. Send the token as `Authorization: Bearer <token>`."}},"schemas":{"ImageUploadRequest":{"type":"object","required":["upload"],"properties":{"upload":{"type":"string","format":"binary","description":"The image to upload, sent as multipart/form-data. Accepted formats are jpeg, png, gif, bmp and webp; SVG is not accepted. The file may not be larger than 4096 kilobytes. The image is stored at a maximum width of 2048 pixels and a thumbnail of 300 pixels wide is generated alongside it."}}},"ImageUpload":{"type":"object","properties":{"url":{"type":"string","description":"The path the stored image is served from, relative to the tenant domain. Use this value as the 'src' of an image in content you send to ControlBee. The file name is generated on upload; the name of the uploaded file is not preserved."},"width":{"type":"integer","description":"The width of the stored image in pixels, after resizing."},"height":{"type":"integer","description":"The height of the stored image in pixels, after resizing."},"message":{"type":"string"}}}},"responses":{"UnauthorizedResponse":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"ForbiddenErrorResponse":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"MethodNotAllowedResponse":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"ValidationErrorResponse":{"description":"Unprocessable content. The request did not pass validation.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","description":"The validation messages per field.","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"InternalServerErrorResponse":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}},"paths":{"/api/policies/upload":{"post":{"summary":"Upload a policy image","description":"Uploads an image for use in a policy description. The returned 'url' can be used as the 'src' of an image in policy content. Uploaded images are stored per company and are only served to users of that company. Requires the 'policy.upload' permission.","operationId":"uploadPolicyImage","tags":["Policies"],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ImageUploadRequest"}}}},"responses":{"200":{"description":"The image was stored. The 'url' is the path the image is served from.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageUpload"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenErrorResponse"},"405":{"$ref":"#/components/responses/MethodNotAllowedResponse"},"422":{"$ref":"#/components/responses/ValidationErrorResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}}}}
```


---

# 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://docs.controlbee.nl/api/policies.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.
