---
source_url: https://www.pubnub.com/docs/sdks/rest-api/delete-channel-metadata
title: Delete channel metadata
---

# Delete channel metadata

> For AI agents: documentation index at https://www.pubnub.com/llms-full.txt

Deletes metadata for the specified channel.

**Note:** Enabling [referential integrity](https://www.pubnub.com/docs/data-storage/metadata/overview.md) on your app’s keyset in the Admin Portal ensures that deleting a channel entity automatically deletes any memberships related to this channel.

| Path Parameters |
| --- |
| `sub_key`string—**REQUIRED**Your app's subscribe key from Admin Portal. |
| `channel`string—**REQUIRED**The channel ID to perform the operation on. Must not be empty and can contain up to 92 UTF-8 byte sequences.Prohibited characters are: ,, /, \, *, :, channel, non-printable ASCII control characters, and Unicode zero. |

| Query Parameters |
| --- |
| `auth`stringString which is either the auth key (Access Manager legacy) or a valid token (Access Manager) used to authorize the operation if access control is enabled. Authorization token with permissions to perform the request. |
| `signature`stringSignature used to verify that the request was signed with the secret key associated with the subscribe key.If Access Manager is enabled, either a valid authorization token or a signature are required. Check Access Manager documentation for details on how to compute the signature. |
| `timestamp`integerUnix epoch timestamp used as a nonce for signature computation. Must have no more than ± 60 seconds offset from NTP. Required if signature parameter is supplied. |

| Responses |
| --- |
| `200`Successfully deleted metadata for the channel.Schema — OPTIONALstatus integer — OPTIONALHTTP status code.data object — OPTIONALObject returned. | Schema—**OPTIONAL** | `status`integer—**OPTIONAL**HTTP status code. | `data`object—**OPTIONAL**Object returned. |
| Schema—**OPTIONAL** |
| `status`integer—**OPTIONAL**HTTP status code. |
| `data`object—**OPTIONAL**Object returned. |
| `403`Disabled - The subscribe key doesn't have App Context API enabled.Forbidden - The client isn't authorized to perform this operation. The authorization key you provided doesn't have the required permissions for this operation.Schema — OPTIONALstatus integer — OPTIONALHTTP status code.error object — OPTIONALError response.message string — OPTIONALUser-facing error message.source string — OPTIONALPossible values: [metadata, authz]Internal source of the error.details object[] — OPTIONALmessage string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | Schema—**OPTIONAL** | `status`integer—**OPTIONAL**HTTP status code. | `error`object—**OPTIONAL**Error response.message string — OPTIONALUser-facing error message.source string — OPTIONALPossible values: [metadata, authz]Internal source of the error.details object[] — OPTIONALmessage string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | `message`string—**OPTIONAL**User-facing error message. | `source`string—**OPTIONAL**Possible values: [metadata, authz]Internal source of the error. | `details`object[]—**OPTIONAL**message string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | `message`string—**OPTIONAL**A user-facing error message. | `location`string—**OPTIONAL**Name of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable. | `locationType`string—**OPTIONAL**Possible values: [path, query, header, body] |
| Schema—**OPTIONAL** |
| `status`integer—**OPTIONAL**HTTP status code. |
| `error`object—**OPTIONAL**Error response.message string — OPTIONALUser-facing error message.source string — OPTIONALPossible values: [metadata, authz]Internal source of the error.details object[] — OPTIONALmessage string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | `message`string—**OPTIONAL**User-facing error message. | `source`string—**OPTIONAL**Possible values: [metadata, authz]Internal source of the error. | `details`object[]—**OPTIONAL**message string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | `message`string—**OPTIONAL**A user-facing error message. | `location`string—**OPTIONAL**Name of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable. | `locationType`string—**OPTIONAL**Possible values: [path, query, header, body] |
| `message`string—**OPTIONAL**User-facing error message. |
| `source`string—**OPTIONAL**Possible values: [metadata, authz]Internal source of the error. |
| `details`object[]—**OPTIONAL**message string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | `message`string—**OPTIONAL**A user-facing error message. | `location`string—**OPTIONAL**Name of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable. | `locationType`string—**OPTIONAL**Possible values: [path, query, header, body] |
| `message`string—**OPTIONAL**A user-facing error message. |
| `location`string—**OPTIONAL**Name of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable. |
| `locationType`string—**OPTIONAL**Possible values: [path, query, header, body] |
| `412`Conditional operation cannot be performed because the target resource has changed since the last retrieval.Schema — OPTIONALstatus integer — OPTIONALHTTP status code.error object — OPTIONALError response.message string — OPTIONALUser-facing error message.source string — OPTIONALPossible values: [metadata, authz]Internal source of the error.details object[] — OPTIONALmessage string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | Schema—**OPTIONAL** | `status`integer—**OPTIONAL**HTTP status code. | `error`object—**OPTIONAL**Error response.message string — OPTIONALUser-facing error message.source string — OPTIONALPossible values: [metadata, authz]Internal source of the error.details object[] — OPTIONALmessage string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | `message`string—**OPTIONAL**User-facing error message. | `source`string—**OPTIONAL**Possible values: [metadata, authz]Internal source of the error. | `details`object[]—**OPTIONAL**message string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | `message`string—**OPTIONAL**A user-facing error message. | `location`string—**OPTIONAL**Name of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable. | `locationType`string—**OPTIONAL**Possible values: [path, query, header, body] |
| Schema—**OPTIONAL** |
| `status`integer—**OPTIONAL**HTTP status code. |
| `error`object—**OPTIONAL**Error response.message string — OPTIONALUser-facing error message.source string — OPTIONALPossible values: [metadata, authz]Internal source of the error.details object[] — OPTIONALmessage string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | `message`string—**OPTIONAL**User-facing error message. | `source`string—**OPTIONAL**Possible values: [metadata, authz]Internal source of the error. | `details`object[]—**OPTIONAL**message string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | `message`string—**OPTIONAL**A user-facing error message. | `location`string—**OPTIONAL**Name of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable. | `locationType`string—**OPTIONAL**Possible values: [path, query, header, body] |
| `message`string—**OPTIONAL**User-facing error message. |
| `source`string—**OPTIONAL**Possible values: [metadata, authz]Internal source of the error. |
| `details`object[]—**OPTIONAL**message string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | `message`string—**OPTIONAL**A user-facing error message. | `location`string—**OPTIONAL**Name of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable. | `locationType`string—**OPTIONAL**Possible values: [path, query, header, body] |
| `message`string—**OPTIONAL**A user-facing error message. |
| `location`string—**OPTIONAL**Name of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable. |
| `locationType`string—**OPTIONAL**Possible values: [path, query, header, body] |
| `429`Request rate limit exceeded.Schema — OPTIONALstatus integer — OPTIONALHTTP status code.error object — OPTIONALError response.message string — OPTIONALUser-facing error message.source string — OPTIONALPossible values: [metadata, authz]Internal source of the error.details object[] — OPTIONALmessage string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | Schema—**OPTIONAL** | `status`integer—**OPTIONAL**HTTP status code. | `error`object—**OPTIONAL**Error response.message string — OPTIONALUser-facing error message.source string — OPTIONALPossible values: [metadata, authz]Internal source of the error.details object[] — OPTIONALmessage string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | `message`string—**OPTIONAL**User-facing error message. | `source`string—**OPTIONAL**Possible values: [metadata, authz]Internal source of the error. | `details`object[]—**OPTIONAL**message string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | `message`string—**OPTIONAL**A user-facing error message. | `location`string—**OPTIONAL**Name of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable. | `locationType`string—**OPTIONAL**Possible values: [path, query, header, body] |
| Schema—**OPTIONAL** |
| `status`integer—**OPTIONAL**HTTP status code. |
| `error`object—**OPTIONAL**Error response.message string — OPTIONALUser-facing error message.source string — OPTIONALPossible values: [metadata, authz]Internal source of the error.details object[] — OPTIONALmessage string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | `message`string—**OPTIONAL**User-facing error message. | `source`string—**OPTIONAL**Possible values: [metadata, authz]Internal source of the error. | `details`object[]—**OPTIONAL**message string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | `message`string—**OPTIONAL**A user-facing error message. | `location`string—**OPTIONAL**Name of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable. | `locationType`string—**OPTIONAL**Possible values: [path, query, header, body] |
| `message`string—**OPTIONAL**User-facing error message. |
| `source`string—**OPTIONAL**Possible values: [metadata, authz]Internal source of the error. |
| `details`object[]—**OPTIONAL**message string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | `message`string—**OPTIONAL**A user-facing error message. | `location`string—**OPTIONAL**Name of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable. | `locationType`string—**OPTIONAL**Possible values: [path, query, header, body] |
| `message`string—**OPTIONAL**A user-facing error message. |
| `location`string—**OPTIONAL**Name of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable. |
| `locationType`string—**OPTIONAL**Possible values: [path, query, header, body] |
| `500`An internal server error occurred.Schema — OPTIONALstatus integer — OPTIONALHTTP status code.error object — OPTIONALError response.message string — OPTIONALUser-facing error message.source string — OPTIONALPossible values: [metadata, authz]Internal source of the error.details object[] — OPTIONALmessage string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | Schema—**OPTIONAL** | `status`integer—**OPTIONAL**HTTP status code. | `error`object—**OPTIONAL**Error response.message string — OPTIONALUser-facing error message.source string — OPTIONALPossible values: [metadata, authz]Internal source of the error.details object[] — OPTIONALmessage string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | `message`string—**OPTIONAL**User-facing error message. | `source`string—**OPTIONAL**Possible values: [metadata, authz]Internal source of the error. | `details`object[]—**OPTIONAL**message string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | `message`string—**OPTIONAL**A user-facing error message. | `location`string—**OPTIONAL**Name of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable. | `locationType`string—**OPTIONAL**Possible values: [path, query, header, body] |
| Schema—**OPTIONAL** |
| `status`integer—**OPTIONAL**HTTP status code. |
| `error`object—**OPTIONAL**Error response.message string — OPTIONALUser-facing error message.source string — OPTIONALPossible values: [metadata, authz]Internal source of the error.details object[] — OPTIONALmessage string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | `message`string—**OPTIONAL**User-facing error message. | `source`string—**OPTIONAL**Possible values: [metadata, authz]Internal source of the error. | `details`object[]—**OPTIONAL**message string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | `message`string—**OPTIONAL**A user-facing error message. | `location`string—**OPTIONAL**Name of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable. | `locationType`string—**OPTIONAL**Possible values: [path, query, header, body] |
| `message`string—**OPTIONAL**User-facing error message. |
| `source`string—**OPTIONAL**Possible values: [metadata, authz]Internal source of the error. |
| `details`object[]—**OPTIONAL**message string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | `message`string—**OPTIONAL**A user-facing error message. | `location`string—**OPTIONAL**Name of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable. | `locationType`string—**OPTIONAL**Possible values: [path, query, header, body] |
| `message`string—**OPTIONAL**A user-facing error message. |
| `location`string—**OPTIONAL**Name of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable. |
| `locationType`string—**OPTIONAL**Possible values: [path, query, header, body] |
| `503`Request processing exceeded the maximum allowed time.Schema — OPTIONALstatus integer — OPTIONALHTTP status code.error object — OPTIONALError response.message string — OPTIONALUser-facing error message.source string — OPTIONALPossible values: [metadata, authz]Internal source of the error.details object[] — OPTIONALmessage string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | Schema—**OPTIONAL** | `status`integer—**OPTIONAL**HTTP status code. | `error`object—**OPTIONAL**Error response.message string — OPTIONALUser-facing error message.source string — OPTIONALPossible values: [metadata, authz]Internal source of the error.details object[] — OPTIONALmessage string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | `message`string—**OPTIONAL**User-facing error message. | `source`string—**OPTIONAL**Possible values: [metadata, authz]Internal source of the error. | `details`object[]—**OPTIONAL**message string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | `message`string—**OPTIONAL**A user-facing error message. | `location`string—**OPTIONAL**Name of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable. | `locationType`string—**OPTIONAL**Possible values: [path, query, header, body] |
| Schema—**OPTIONAL** |
| `status`integer—**OPTIONAL**HTTP status code. |
| `error`object—**OPTIONAL**Error response.message string — OPTIONALUser-facing error message.source string — OPTIONALPossible values: [metadata, authz]Internal source of the error.details object[] — OPTIONALmessage string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | `message`string—**OPTIONAL**User-facing error message. | `source`string—**OPTIONAL**Possible values: [metadata, authz]Internal source of the error. | `details`object[]—**OPTIONAL**message string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | `message`string—**OPTIONAL**A user-facing error message. | `location`string—**OPTIONAL**Name of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable. | `locationType`string—**OPTIONAL**Possible values: [path, query, header, body] |
| `message`string—**OPTIONAL**User-facing error message. |
| `source`string—**OPTIONAL**Possible values: [metadata, authz]Internal source of the error. |
| `details`object[]—**OPTIONAL**message string — OPTIONALA user-facing error message.location string — OPTIONALName of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable.locationType string — OPTIONALPossible values: [path, query, header, body] | `message`string—**OPTIONAL**A user-facing error message. | `location`string—**OPTIONAL**Name of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable. | `locationType`string—**OPTIONAL**Possible values: [path, query, header, body] |
| `message`string—**OPTIONAL**A user-facing error message. |
| `location`string—**OPTIONAL**Name of the offending query string parameter, or a dot-delimited JSON path to the source of the error in the input document, if applicable. |
| `locationType`string—**OPTIONAL**Possible values: [path, query, header, body] |

sub_key
*
Type:
string
Your app's subscribe key from
[Admin Portal](https://admin.pubnub.com)
.
channel
*
Type:
string
The channel ID to perform the operation on. Must not be empty and can contain up to 92 UTF-8 byte sequences.

Prohibited characters
are:
,
,
/
,
\
,
*
,
:
, channel, non-printable ASCII control characters, and Unicode zero.
auth
Type:
string
String which is either the auth key (Access Manager legacy) or a valid token (
[Access Manager](https://www.pubnub.com/docs/security/access-control/overview.md)
) used to authorize the operation if access control is enabled. Authorization token with permissions to perform the request.
signature
Type:
string
Signature used to verify that the request was signed with the secret key associated with the subscribe key.

If Access Manager is enabled, either a valid authorization token or a signature are required.

Check
[Access Manager documentation](https://www.pubnub.com/docs/sdks/rest-api/access-manager-introduction.md)
for details on how to compute the signature.
timestamp
Type:
integer
Unix epoch timestamp used as a nonce for signature computation. Must have no more than ± 60 seconds offset from NTP.

Required if
signature
parameter is supplied.
status
Type:
integer
HTTP status code.
data
Type:
object
Object returned.
Disabled - The subscribe key doesn't have App Context API enabled.

Forbidden - The client isn't authorized to perform this operation. The authorization key you provided doesn't have the required permissions for this operation.
status
Type:
integer
HTTP status code.
error
Type:
object
Error response.
Example Response
Example
1
Example
2

```
{
  "status": 403,
  "error": {
    "message": "Invalid signature",
    "source": "authz",
    "details": [
      {
        "message": "Client and server produced different signatures for the same inputs.",
        "location": "signature",
        "locationType": "query"
      }
    ]
  }
}
```

status
Type:
integer
HTTP status code.
error
Type:
object
Error response.
Example Response

```
{
  "status": 412,
  "error": {
    "message": "Resource already changed by another request since the last retrieval.",
    "source": "metadata"
  }
}
```

status
Type:
integer
HTTP status code.
error
Type:
object
Error response.
Example Response

```
{
  "status": 429,
  "error": {
    "message": "You have exceeded the maximum number of requests per second allowed for your subscribe key.",
    "source": "metadata"
  }
}
```

status
Type:
integer
HTTP status code.
error
Type:
object
Error response.
Example Response

```
{
  "status": 500,
  "error": {
    "message": "An unexpected error occurred while processing the request.",
    "source": "metadata"
  }
}
```

status
Type:
integer
HTTP status code.
error
Type:
object
Error response.
Example Response

```
{
  "status": 503,
  "error": {
    "message": "The server took longer to respond than the maximum allowed processing time.",
    "source": "metadata"
  }
}
```
