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

# Files

## Get File

> Get info and Base64 content of a file

```json
{"openapi":"3.1.1","info":{"title":"RiskBase API","version":"0.0.1"},"tags":[{"name":"Files","description":""}],"servers":[{"url":"https://api3.riskbase.uk"}],"security":[{"Bearer Authentication":[]}],"components":{"securitySchemes":{"Bearer Authentication":{"type":"http","scheme":"bearer","description":"`Authorization: Bearer {AuthorizationToken}`"}}},"paths":{"/files/{fileId}":{"get":{"tags":["Files"],"summary":"Get File","description":"Get info and Base64 content of a file","parameters":[{"schema":{"type":"string","format":"UID"},"in":"path","name":"fileId","required":true},{"schema":{"type":"boolean"},"in":"query","name":"includeBase64","description":"Include Base64 encoded content"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"title":{"type":"string"},"size":{"type":"integer"},"width":{"type":"integer"},"height":{"type":"integer"},"mime":{"type":"string","enum":["application/acad","application/msword","application/octet-stream","application/pdf","application/postscript","application/vnd.ms-excel","application/vnd.ms-excel.sheet.macroEnabled.12","application/vnd.ms-outlook","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/x-rar-compressed","application/zip","image/bmp","image/gif","image/heic","image/jpeg","image/png","image/svg+xml","image/tiff","message/rfc822","text/csv; charset=utf-8","text/plain","text/rtf","text/xml","video/mp4","video/mpeg","video/quicktime","video/webm","..."]},"extension":{"type":"string","enum":["bmp","csv","doc","docx","dwg","eml","file","gif","heic","jpeg","mov","mp4","mpeg","msg","pdf","png","ppt","pptx","ps","rar","rtf","svg","tiff","txt","webm","xls","xlsm","xlsx","xml","zip","..."]},"base64Content":{"type":"string","contentEncoding":"base64","contentMediaType":"application/json"}}}}}}}}}}}
```

## Get File Binary

> Get the binary of a file

```json
{"openapi":"3.1.1","info":{"title":"RiskBase API","version":"0.0.1"},"tags":[{"name":"Files","description":""}],"servers":[{"url":"https://api3.riskbase.uk"}],"security":[{"Bearer Authentication":[]}],"components":{"securitySchemes":{"Bearer Authentication":{"type":"http","scheme":"bearer","description":"`Authorization: Bearer {AuthorizationToken}`"}}},"paths":{"/files/{fileId}/binary":{"get":{"tags":["Files"],"summary":"Get File Binary","description":"Get the binary of a file","parameters":[{"schema":{"type":"string","format":"UID"},"in":"path","name":"fileId","required":true}],"responses":{"200":{"content":{"mime/type":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}}}}}}}
```


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.riskbase.uk/riskbase-docs/api/files.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
