---
title: "Clear the collection access level."
method: DELETE
path: "/_api/key/{keyid}/database/{dbname}/collection/{collection}"
tags: ["API Keys"]
---

# Clear the collection access level.

`DELETE /_api/key/{keyid}/database/{dbname}/collection/{collection}`

## Request

- The document declares no server URL.
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/macrometa/apis/macrometa-api-reference/docs/_api/key/:keyid/database/:dbname/collection/:collection/delete.ts> (a function with typed inputs; its response is checked against the schema)

Clears the access level for the collection *collection* in the database *dbname* of API key with *keyid*. Reverts to default collection access level. If there is no defined default collection access level, it defaults to *No access*.

**Note**: Requires *administrator* permissions.

## Path parameters

- `keyid` string, string, required
- `dbname` string, string, required
- `collection` string, string, required

## Response `202`

Successfully cleared access level.

- ApiKeyHttpExamplesRc202
  - `code` integer: HTTP response code.
  - `error` boolean, required: Flag if there is an error in response. *False* for this response.

## Other responses

- `400`: Failed due to missing or malformed data. Verify that all parameters are complete.
- `404`: Failed to find specified API key.

---

[API](https://skmtc.dev/macrometa/apis/macrometa-api-reference.md) - [All operations](https://skmtc.dev/macrometa/apis/macrometa-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/macrometa/apis/macrometa-api-reference/revisions/2006b6d7f31d?raw)
