Set channel metadata

Sets metadata for the specified channel. Returns the channel object, optionally including custom properties.

Note:

  • You can change all of the channel's metadata except its identifier.
  • Invalid property names are silently ignored and will not cause a request to fail.
  • If you set the custom property, you must completely replace it since partial updates are not supported.
  • The custom object can only contain scalar values.
Path Parameters
sub_key string REQUIRED

Your app's subscribe key from Admin Portal.

channel string REQUIRED

The channel name 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
include string[]

Possible values: [custom, type, status]

List of additional/complex metadata to include in the response. Omit this query parameter if you don't want to retrieve additional metadata.

auth string

String which is either the auth key (PAM v2) 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 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 for details on how to compute the signature.

timestamp 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.

Request Body REQUIRED

JSON object with channel metadata to set.

name string

Possible values: 1 ≤ length

The channel name to perform the operation on. Max. 2,048 characters. Must not be empty or consist only of whitespace characters.

description string

Description of the channel. Max. 2,048 characters.

type string

Channel type. Max. 50 characters.

status string

Channel status. Max. 50 characters.

custom object

JSON object of key/value pairs with supported data-types. Values must be scalar only; arrays or objects are not supported.

Responses
200

Successfully set the channel metadata.

Schema OPTIONAL
status integer OPTIONAL

HTTP status code.

data object OPTIONAL

Object with channel metadata used in responses.

id string OPTIONAL

Possible values: 1 ≤ length ≤ 92

The channel name to perform the operation on. Must not be empty, and may contain up to 92 UTF-8 byte sequences.

Prohibited characters are: ,, /, \, *, :, channel, non-printable ASCII control characters, and Unicode zero.

updated date-time OPTIONAL

Date and time the object was last updated.

eTag string OPTIONAL

The object's content fingerprint used in conditional requests.

name string OPTIONAL

Possible values: 1 ≤ length

The channel name to perform the operation on. Max. 2,048 characters. Must not be empty or consist only of whitespace characters.

description string OPTIONAL

Description of the channel. Max. 2,048 characters.

type string OPTIONAL

Channel type. Max. 50 characters.

status string OPTIONAL

Channel status. Max. 50 characters.

custom object OPTIONAL

JSON object of key/value pairs with supported data-types. Values must be scalar only; arrays or objects are not supported.

400

The request body contains invalid data.

Schema OPTIONAL
status integer OPTIONAL

HTTP status code.

error object OPTIONAL

Error response.

message string OPTIONAL

User-facing error message.

source string OPTIONAL

Possible values: [metadata, authz]

Internal source of the error.

details object[] OPTIONAL
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]

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 OPTIONAL
status integer OPTIONAL

HTTP status code.

error object OPTIONAL

Error response.

message string OPTIONAL

User-facing error message.

source string OPTIONAL

Possible values: [metadata, authz]

Internal source of the error.

details object[] OPTIONAL
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 OPTIONAL
status integer OPTIONAL

HTTP status code.

error object OPTIONAL

Error response.

message string OPTIONAL

User-facing error message.

source string OPTIONAL

Possible values: [metadata, authz]

Internal source of the error.

details object[] OPTIONAL
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]

415

The format of the request body you supplied isn't supported. The request body must be in JSON format.

Schema OPTIONAL
status integer OPTIONAL

HTTP status code.

error object OPTIONAL

Error response.

message string OPTIONAL

User-facing error message.

source string OPTIONAL

Possible values: [metadata, authz]

Internal source of the error.

details object[] OPTIONAL
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 OPTIONAL
status integer OPTIONAL

HTTP status code.

error object OPTIONAL

Error response.

message string OPTIONAL

User-facing error message.

source string OPTIONAL

Possible values: [metadata, authz]

Internal source of the error.

details object[] OPTIONAL
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 OPTIONAL
status integer OPTIONAL

HTTP status code.

error object OPTIONAL

Error response.

message string OPTIONAL

User-facing error message.

source string OPTIONAL

Possible values: [metadata, authz]

Internal source of the error.

details object[] OPTIONAL
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 OPTIONAL
status integer OPTIONAL

HTTP status code.

error object OPTIONAL

Error response.

message string OPTIONAL

User-facing error message.

source string OPTIONAL

Possible values: [metadata, authz]

Internal source of the error.

details object[] OPTIONAL
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]