# Change how long the desk keeps them (owner or manager)

`PUT /workspace/inbox/retention` · Rivier · inbox

Change how long the desk keeps them (owner or manager).

- Scope: inbox:write
- Graphql: Mutation.inboxRetentionSet
- Sdk: inbox.retention.set
- Cli: inbox retention set

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "trashDays": {
      "type": "integer",
      "minimum": 1,
      "maximum": 3650
    },
    "junkDays": {
      "type": "integer",
      "minimum": 1,
      "maximum": 3650
    },
    "heldDays": {
      "type": "integer",
      "minimum": 1,
      "maximum": 3650
    },
    "closedDays": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 30,
          "maximum": 3650
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X PUT 'https://api.rivier.ai/workspace/inbox/retention' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "trashDays": 0,
  "junkDays": 0,
  "heldDays": 0,
  "closedDays": 0
}'
```
