---
title: "Remove a sample from a kept draft"
description: "Mappings API"
---

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

# Remove a sample from a kept draft

{/* Generated by apps/docs/scripts/generate.ts from contracts/api/openapi.yaml. Do not edit. */}
<div class="cvo-op">
<div class="cvo-op-main">

<div class="cvo-op-header">
<div class="cvo-op-path-row">
<span class="cvo-method" data-method="delete">DELETE</span>
<code class="cvo-op-path-code">/v1/mappings/drafts/&#123;id&#125;/samples/&#123;sha256&#125;</code>
</div>
</div>

The sample leaves the draft's corpus. The draft is made again from the samples left, and every decision is applied again; one that no longer applies is named in `notApplied`. When the last sample of a draft started from the model leaves, the draft is the model's empty card again, with its decisions. A draft for a registered model, or a new version of a saved mapping, is made from samples, so its last sample cannot be removed.

## Path parameters

## Status codes

| Status | Meaning |
|---|---|
| `200` | The draft, as `GET /v1/mappings/drafts/{id}` answers it. |
| `401` | No usable credential was sent (`invalid_credentials`). |
| `404` | This company has no such draft (`unknown_mapping_draft`), or the draft holds no sample with that sha256 (`unknown_sample`). |
| `409` | `mapping_draft_finalized`: the draft is finalized and never changes. `last_sample_needed`: the draft is made from samples, so its last one stays until another is added. |
| `413` | A sample left holds more than one request may carry once read (`file_too_large_to_read`). Nothing was changed. |
| `422` | The samples left cannot be profiled together (`several_sources`, `not_one_source`, `unreadable_file`, `unprofilable_sample`). Nothing was changed. |
| `503` | The profiler did not answer (`profiler_unavailable`). Nothing was changed. |

</div>
<div class="cvo-op-aside">

</div>
</div>

Source: https://docs.certinvo.com/reference/api/mappings/remove-a-sample-from-a-kept-draft/index.mdx
