> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apostra.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete from Apostra

> Preview, schedule, and Undo permanent deletion of a connected seller Library document.

## Delete a connected Library document (beta)

**Delete from Apostra** is a beta capability for enabled seller accounts. It
uses the V3 `save_material` tool and is available only to a directly signed-in
seller administrator. API keys, service credentials, and agent credentials
cannot preview, schedule, or Undo a deletion.

The beta accepts exactly one document per preview, delete, or Undo call.

Deletion is destructive. Scheduling it archives the document immediately,
excludes its connected-source item so sync cannot import it again, and removes
the document from new proposal composition. Preview the affected saved
proposals before confirming. At the end of the 30-day Undo window, Apostra
purges the document and redacts saved proposal text, proposal artifacts, and
compose inputs that used or cited it. Copies already sent to buyers cannot be
recalled.

### V3 `save_material` actions

Use the action calls below only for this beta workflow. Each delete and Undo
names one `materialId`.

| Action | Required inputs | Result |
| - | - | - |
| `preview_permanent_delete` | `action`, `materialId` | Returns the affected saved-proposal count and names, plus a `confirmationId`. The confirmation is bound to the current administrator and expires after 10 minutes. |
| `delete_permanently` | `action`, `materialId`, `confirmationId` from the current preview | Archives the document now and schedules its permanent purge after 30 days. Re-run preview if the document's current eligibility or proposal impact changes. |
| `undo_permanent_delete` | `action`, `materialId` | Cancels the pending purge and restores the archived document during the 30-day window. |

Preview first, inspect the impact, and pass its confirmation to the delete
call:

```json theme={null}
{
  "action": "preview_permanent_delete",
  "materialId": "mat_123"
}
```

```json theme={null}
{
  "action": "delete_permanently",
  "materialId": "mat_123",
  "confirmationId": "CONFIRMATION_FROM_PREVIEW"
}
```

Undo uses the same document identity:

```json theme={null}
{
  "action": "undo_permanent_delete",
  "materialId": "mat_123"
}
```

Undo restores the document but does not lift its connected-source exclusion.
Sync never lifts an exclusion. Use the explicit **Include again** seller action
when you want a fresh copy of the connected item imported, including after the
purge has completed.

For importing and maintaining Library material, see
[Bring data in](https://docs.apostra.com/v3/bring-data-in.md#add-seller-materials).

## Beta release check

Brian O'Kelley owns the beta release check. Immediately after exposing the beta
to a seller, and before that seller's 30-day window ends, he runs one real
preview, schedule, and Undo on a disposable connected Library document. The
check passes only when the receipt records the same document and seller, the
document archives immediately, Undo restores it, and its source remains
excluded. If any step fails or the receipt disagrees, pause new beta exposure
and disable the beta before a scheduled purge can run. If Undo fails, do not
leave the disposable document scheduled for deletion: remediate the failure
and retry Undo until it succeeds. Investigate before enabling another seller.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.