# Delete collection

To delete collection via API, get the **collection\_id** of the processed file from:

* [Upload a file](https://alphamoon.gitbook.io/documentation/~/changes/E5WHATIwrsF0u91xTwvD/api/upload-file) endpoint (Base64 or Binary)
* Get collections endpoint
* URL\
  **e.g.** <https://workspace.alphamoon.ai/supervision/**223742cc9bca43fd81b2d41b0018e4c7>\*\*

Use the following endpoint to delete the given collection:

## Delete collection by ID

<mark style="color:red;">`DELETE`</mark> `/api/v0.3/collections/{collection_id}`

**Path parameters**

| Name                                            | Type   | Description              |
| ----------------------------------------------- | ------ | ------------------------ |
| collection-id<mark style="color:red;">\*</mark> | String | The ID of the collection |

**Response**

{% tabs %}
{% tab title="204: OK Successful Response" %}

```bash
"string"
```

{% endtab %}

{% tab title="422: Unprocessable Entity Validation error" %}

```json
{
  "detail": [
    {
      "loc": [
        "string",
        0
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}
```

{% endtab %}
{% endtabs %}

#### See the example:

{% tabs %}
{% tab title="API call" %}

```bash
curl -X 'DELETE' \
  'https://workspace.alphamoon.ai/api/v0.3/collections/4635c1aed59d45aa9268501fdc4d59c3' \
  -H 'accept: */*' \
  -H 'Authorization: Basic API_KEY_BASE64_ENCODED'
```

{% endtab %}

{% tab title="Server response" %}

```json
"string"
```

{% endtab %}
{% endtabs %}

**See more:**
