## 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:
- `PUT` - the type of API request being made.
- `https://api.kevel.co` - the URL for the request.
- `v1` - the API version.
- `channel` - the API endpoint being called.
- `ChannelID` - the ID associated with the channel.

> ### 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

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

### Example Request

```bash
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]}'
```
