# Delete a vocabulary

Deletes a saved vocabulary: open sessions keep its entries until they end, and a new session that names it is refused.

`DELETE /v1/vocabularies/{id}` on `https://api.eu.vatis.tech`

> **Admin key only.** A Member key gets `403` `admin_only`. Roles: [Authentication and API keys](https://platform.vatis.tech/docs/authentication).

## Path parameters

| parameter | values | default | meaning |
|---|---|---|---|
| `id` | a vocabulary id, `voc_...` | required | The vocabulary. |

## Headers

| header | values | default | meaning |
|---|---|---|---|
| `Authorization` | `Bearer <api key>` | required | An Admin key ([Roles](https://platform.vatis.tech/docs/authentication#roles)). A Member key gets `403` `admin_only`. |

## Responses

`204`: Deleted. The answer has no body.

`400` `invalid_parameter`: A query parameter: this endpoint takes none ([Strict parameters](https://platform.vatis.tech/docs/errors#strict-parameters)).

`401` `unauthorized`: No key, or a wrong, revoked or expired one.

```json
{
  "error": {
    "code": "unauthorized",
    "message": "Invalid, revoked or expired key.",
    "param": null,
    "request_id": "req_bf2fed760ba5437ba0933a57"
  }
}
```

`403` `admin_only`: A Member key.

`404` `not_found`: No vocabulary of your workspace has that id.

```json
{
  "error": {
    "code": "not_found",
    "message": "Vocabulary not found.",
    "param": null,
    "request_id": "req_bf2fed760ba5437ba0933a57"
  }
}
```

`503` `unavailable`: The service is busy for a moment. Send the request again after the seconds of the `Retry-After` header.

## Notes

- A new session or file that names a deleted vocabulary is refused: `invalid_parameter`, `param` `vocabulary_id`. A job accepted before the delete keeps its entries. Its name is free again.
