> 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"}}}}}}}}}
```
