---
title: "Preview contact retention"
method: GET
path: "/contacts/retention_preview"
tags: ["Contacts"]
---

# Preview contact retention

`GET /contacts/retention_preview`

## Request

- Base URL: `https://api.crevio.co/v1`
- URL: `https://api.crevio.co/v1/contacts/retention_preview`
- Auth: API key in header `Authorization`

Shows what a retention period would delete: leads (contacts without an account) with no form submission, booking, call, checkout or 1:1 email in the last `days` days. Broadcasts don't count as contact. Leads with orders are kept and counted in `exempt_count`. Contacts with an account are never deleted by retention. Set the period with `contact_retention_days` on `PATCH /v1/account`; a daily job then deletes matching leads, and they are permanently erased `purge_after_days` later.

## Query parameters

- `days` integer

## Response `200`

Retention preview

- object
  - `object` 'contact_retention_preview', required
  - `days` integer, nullable, required: The period previewed; null when none was given and the account has none set.
  - `deletable_count` integer, required
  - `exempt_count` integer, required: Inactive leads kept because they have paid orders.
  - `purge_after_days` integer, required
  - `sample` Contact[], required: Up to 20 of the leads that would be deleted, oldest first.
    - `id` string, required
    - `object` string, required
    - `email` string, required
    - `name` string, nullable, required
    - `first_name` string, nullable, required
    - `last_name` string, nullable, required
    - `phone_number` string, nullable, required
    - `company` string, nullable, required
    - `lifecycle` 'lead' | 'customer', required
    - `became_customer_at` string, date-time, nullable, required
    - `notes` string, nullable, required
    - `confirmed_at` string, date-time, nullable, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `deleted_at` string, date-time, nullable, required
    - `purge_at` string, nullable, required
    - `subscribed` boolean
    - `anonymized` boolean, required
    - `metadata` object, required
    - `orders_count` integer, required: Live orders that went through: refunded ones count, while pending, failed and test-mode orders don't.
    - `total_spend` integer, required: Lifetime spend in the smallest unit of the account's currency, net of refunds. Test-mode orders and disputed charges are left out.
    - `tags` unknown[], required
      - unknown

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `403`: Forbidden
- `429`: Rate limit exceeded — 600 requests per minute per owner on the free tier: every API key and OAuth token one person holds on an account shares one budget, and the account's team keys share another. Retry after the number of seconds in `Retry-After`.
- `500`: Internal server error

## Changes

- **2026-11-15** `56c22ab9b282`: 5 warning
  - added the new `idempotency_error` enum value to the `error/type` response property for the response status `400`
  - added the new `idempotency_error` enum value to the `error/type` response property for the response status `401`
  - added the new `idempotency_error` enum value to the `error/type` response property for the response status `403`
  - added the new `idempotency_error` enum value to the `error/type` response property for the response status `429`
  - …1 more
- **2026-11-14** `a37321cbfdd6`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/crevio/apis/crevio-api-v1/changes/contacts/retention_preview/get.md)

---

[API](https://skmtc.dev/crevio/apis/crevio-api-v1.md) - [All operations](https://skmtc.dev/crevio/apis/crevio-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/crevio/apis/crevio-api-v1/revisions/ccbd8fcbd6d7?raw)
