---
updatedAt: 2025-10-09T17:39:26.000Z
agentTools:
  projectIndex: https://docs.uplynk.com/llms.txt
---

# Add/Remove Live Channels

v4

Adds and removes live channels from a failover group.

Adding a live channel to a failover group automatically assigns the failover group's active Live Slicer to that live channel.

This endpoint does not replace the entire set of live channels associated with a failover group. Rather, it only adds or removes live channels from it.

### Request

Request syntax:

PUT /failover-groups/[Failover Group ID](#FailoverGroupID-ARLC)/channels

Request URL variable:

Define the following variable when submitting the above request:

| Variable                    | Description                                                                                                                                                                                                                    |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Failover Group ID  Required | Replace this variable with the system-defined ID assigned to the desired failover group. Use the [Get All Failover Groups endpoint](#GetAllFailoverGroups) to retrieve a list of failover groups and their system-defined IDs. |

Request body parameters:

Pass the following request body parameters:

| Name                      | Data Type             | Description                                                                                                                                                                                                                                                                                                                              |
| ------------------------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| channels\_ids\_to\_add    | List of String Values | Contains a list of the live channels that will be added to the failover group. Identify each desired live channel by its system-defined ID. You may only add a live channel if it does not belong to another failover group. Reassign a live channel to a different failover group by first removing it from its current failover group. |
| channels\_ids\_to\_remove | List of String Values | Contains a list of the live channels that will be removed from the failover group. Identify each desired live channel by its system-defined ID.                                                                                                                                                                                          |

### Response

The response for a successful request is a 204 No Content.

The response for a request to add a live channel that is already assigned to a failover group is a 409 Conflict.

### Sample Request/Response

The code below (Python 3) shows how to update the set of live channels associated with a failover group.

This code imports names from the `api_auth` module for V4 APIs (see below).

<TutorialTile
  backgroundColor="#018FF4"
  emoji="🦉"
  id="682d18228dd6230012097fad"
  link="https://docs.uplynk.com/v2.0/recipes/api-auth-for-classic-authentication-v4-apis"
  slug="api-auth-for-classic-authentication-v4-apis"
  title="API Auth for Classic Authentication (V4 APIs)"
/> 

```python
import json
import requests
from api_auth import APICredentials, APIParams

class FailoverGroup:
    def __init__(self):
        self.host = "https://services.uplynk.com"

    def run(self):
        self._add_remove_live_channels()

    def _add_remove_live_channels(self):
        failover_group_id = 'e8d6b5cb940c40cc9ec6ad081a38f3f0' # Replace with the ID for the desired failover group.
        url = "{}{}{}{}".format(self.host, "/api/v4/failover-groups/", failover_group_id, "/channels")

        payload = {
            'channels_ids_to_add': [
                'c3481b4f12ae471d9b727a6e27ea4675',
                'g341643dn409198f523flniu1234n34d'
            ],
            'channels_ids_to_remove': [
                'h3481b4f12ae471d9b722a6e27ea4274'
            ]
        }

        headers = {'Content-Type': 'application/json'}

        response = requests.put(
            url, params=APIParams(APICredentials()).get_params({}), data=json.dumps(payload), headers=headers
        )

        print(response.status_code)

FailoverGroup().run()
```