# A job in another module records a retention run it did

`POST /compliance/center/evidence/retention-runs` · Rivier · compliance

A job in another module records a retention run it did.

- Scope: compliance:write
- Sdk: compliance.retention.evidence
- Cli: compliance retention evidence

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "target": {
      "type": "string",
      "minLength": 2,
      "maxLength": 60
    },
    "days": {
      "type": "integer",
      "minimum": 1,
      "maximum": 3650
    },
    "matched": {
      "type": "integer",
      "minimum": 0
    },
    "deleted": {
      "type": "integer",
      "minimum": 0
    },
    "oldestRemaining": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 40
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "at": {
      "type": "string",
      "format": "date-time"
    },
    "status": {
      "type": "string",
      "enum": [
        "ok",
        "failed",
        "skipped"
      ],
      "default": "ok"
    },
    "note": {
      "type": "string",
      "maxLength": 300,
      "default": ""
    }
  },
  "required": [
    "target",
    "days",
    "matched",
    "deleted"
  ],
  "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 POST 'https://api.rivier.ai/compliance/center/evidence/retention-runs' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "target": "string",
  "days": 0,
  "matched": 0,
  "deleted": 0
}'
```
