Update Channels

Why Update a Channel?

Occasionally, when working with channels in your network, you may need to make changes or edit an existing channel. The Inventory Management API enables you to update a channel in your network, via the PUT command, using the ChannelID.

API Syntax

When using the Update Channels API endpoint it is important to understand the syntax required to make the request. Because the Kevel API is a RESTful API, there is a specific request format that must be followed to ensure the endpoint can process the request. The format is:

PUT https://api.kevel.co/v1/channel/`ChannelID`

Where:

Note

Make sure to set Engine to 0 in all requests.

Clearing attribute values

To unset or clear an attribute, set its value to NULL.

Parameters

Parameter Type Requirement Description
ChannelID int32 required The ID of the Channel
Id int32 required Required - cannot be changed
Engine string required Defaults to 0, set to 0
Title string required Change title if you want
AdTypes array of int32s required This will reset the AdTypes associated with the Channel

Response Structure

{
  "Id": 1234,
  "Title": "New Channel Name",
  "Commission": 0,
  "Engine": 0,
  "Keywords": null,
  "CPM": 0,
  "AdTypes": [5],
  "IsDeleted": false,
  "CustomTargeting": null
}

Example Request

curl -X PUT -H "X-Adzerk-ApiKey:$ADZERK_API_KEY" -H "Content-Type:application/json" "https://api.kevel.co/v1/channel/1234" --data-binary '{"Id":1234,"Title":"New Channel Name","Engine":"0","AdTypes":[5]}'