---
title: "Pin a message so the retention sweep won't delete it."
method: POST
path: "/v1/messages/{id}/keep"
tags: ["Messages"]
---

# Pin a message so the retention sweep won't delete it.

`POST /v1/messages/{id}/keep`

## Request

- Base URL: `https://api.inboxy.net`
- URL: `https://api.inboxy.net/v1/messages/{id}/keep`
- Auth: HTTP bearer

Cap of 10 currently-kept per user. Idempotent — re-keeping returns the existing `kept_at`. Writes an `audit_log` row with action `api_message_kept`.

## Path parameters

- `id` string, uuid, required

## Response `200`

Kept (or already-kept).

- KeepResult: Result of a keep / unkeep call. `kept_at` is null after unkeep, unix-seconds after keep.
  - `id` string, uuid, required
  - `kept_at` integer, nullable, required

## Other responses

- `403`: Token lacks the required scope.
- `404`: No matching resource owned by the caller.
- `409`: `keep_limit_reached` — cap depends on your plan. Unkeep one to free a slot.

---

[API](https://skmtc.dev/inboxy/apis/inboxy-api.md) · [All operations](https://skmtc.dev/inboxy/apis/inboxy-api/llms.txt) · [OpenAPI document](https://skmtc.dev/inboxy/apis/inboxy-api/revisions/25155a8dec0f?raw)
