# DataRetention

## Performs the Get operation.

> Use this endpoint to execute the get workflow in DataRetentionController.\
> \
> Required roles: Admin.

```json
{"openapi":"3.0.1","info":{"title":"WebApi | v1","version":"1.0.0"},"tags":[{"name":"DataRetention"}],"servers":[{"url":"https://api.safegpt.nl/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"JWT bearer token. Example: 'Bearer {token}'.","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/v1/DataRetention/Get":{"get":{"tags":["DataRetention"],"summary":"Performs the Get operation.","description":"Use this endpoint to execute the get workflow in DataRetentionController.\n\nRequired roles: Admin.","parameters":[{"name":"companyId","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Authentication is required."},"403":{"description":"The user is not authorized to access this endpoint."}}}}}}
```

## Performs the Get operation.

> Use this endpoint to execute the get workflow in DataRetentionController.\
> \
> Required roles: Admin.

```json
{"openapi":"3.0.1","info":{"title":"WebApi | v1","version":"1.0.0"},"tags":[{"name":"DataRetention"}],"servers":[{"url":"https://api.safegpt.nl/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"JWT bearer token. Example: 'Bearer {token}'.","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/v1/DataRetention/Get/{dataRetentionId}":{"get":{"tags":["DataRetention"],"summary":"Performs the Get operation.","description":"Use this endpoint to execute the get workflow in DataRetentionController.\n\nRequired roles: Admin.","parameters":[{"name":"dataRetentionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Authentication is required."},"403":{"description":"The user is not authorized to access this endpoint."}}}}}}
```

## Create data retention.

> Use this endpoint to create data retention.\
> \
> Required roles: Admin.

```json
{"openapi":"3.0.1","info":{"title":"WebApi | v1","version":"1.0.0"},"tags":[{"name":"DataRetention"}],"servers":[{"url":"https://api.safegpt.nl/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"JWT bearer token. Example: 'Bearer {token}'.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CreateDataRetentionViewModel":{"type":"object","properties":{"chatHistory":{"type":"integer","format":"int32"},"media":{"type":"integer","format":"int32"}},"description":"Represents the payload for creating data-retention settings."}}},"paths":{"/v1/DataRetention/Create/{companyId}":{"post":{"tags":["DataRetention"],"summary":"Create data retention.","description":"Use this endpoint to create data retention.\n\nRequired roles: Admin.","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDataRetentionViewModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateDataRetentionViewModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CreateDataRetentionViewModel"}}},"required":true},"responses":{"200":{"description":"OK"},"401":{"description":"Authentication is required."},"403":{"description":"The user is not authorized to access this endpoint."}}}}}}
```

## Update data retention.

> Use this endpoint to update data retention.\
> \
> Required roles: Admin.

```json
{"openapi":"3.0.1","info":{"title":"WebApi | v1","version":"1.0.0"},"tags":[{"name":"DataRetention"}],"servers":[{"url":"https://api.safegpt.nl/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"JWT bearer token. Example: 'Bearer {token}'.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UpdateDataRetentionViewModel":{"type":"object","properties":{"chatHistory":{"type":"integer","format":"int32"},"media":{"type":"integer","format":"int32"}},"description":"Represents the payload for updating data-retention settings."}}},"paths":{"/v1/DataRetention/Update/{dataRetentionId}":{"put":{"tags":["DataRetention"],"summary":"Update data retention.","description":"Use this endpoint to update data retention.\n\nRequired roles: Admin.","parameters":[{"name":"dataRetentionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDataRetentionViewModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateDataRetentionViewModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateDataRetentionViewModel"}}},"required":true},"responses":{"200":{"description":"OK"},"401":{"description":"Authentication is required."},"403":{"description":"The user is not authorized to access this endpoint."}}}}}}
```

## Delete data retention.

> Use this endpoint to delete data retention.\
> \
> Required roles: Admin.

```json
{"openapi":"3.0.1","info":{"title":"WebApi | v1","version":"1.0.0"},"tags":[{"name":"DataRetention"}],"servers":[{"url":"https://api.safegpt.nl/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"JWT bearer token. Example: 'Bearer {token}'.","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/v1/DataRetention/Delete/{dataRetentionId}":{"delete":{"tags":["DataRetention"],"summary":"Delete data retention.","description":"Use this endpoint to delete data retention.\n\nRequired roles: Admin.","parameters":[{"name":"dataRetentionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Authentication is required."},"403":{"description":"The user is not authorized to access this endpoint."}}}}}}
```


---

# Agent Instructions: 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.safegpt.nl/api-en/endpoints/dataretention.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.
