# Video Channels

Operations dealing with the creation, modification and listing of videos within a channel.

## List video channels

`GET /api/v1/video-channels`

Authentication: no security requirement declared for this operation.

Parameters:

- `start` (query, integer, optional) - Offset used to paginate results
  Type: integer
  
  minimum: 0

- `count` (query, integer, optional) - Number of items to return
  Type: integer
  
  default: 15
  
  minimum: 1
  
  maximum: 100

- `sort` (query, string, optional) - Sort column
  Type: string
  
  Example:
  
  ```json
  "-createdAt"
  ```

Responses:

- 200: successful operation

Content type: application/json

Type: VideoChannelList

Schema: [VideoChannelList](https://docs.joinpeertube.org/api-rest-reference/api/models/videochannellist.md)

- `total` (optional)
  Type: integer
  
  Example:
  
  ```json
  1
  ```

- `data` (optional)
  Type: Array<Actor & object & Actor>
  
  Items:
    Type: Actor & object & Actor
    
    allOf:
      Reference: [VideoChannel](https://docs.joinpeertube.org/api-rest-reference/api/models/videochannel.md); Type: Actor & object
    
      Reference: [Actor](https://docs.joinpeertube.org/api-rest-reference/api/models/actor.md); Type: Actor

## Examples

### cURL

```bash
curl -X GET 'https://peertube2.cpy.re/api/v1/video-channels?count=15'
```

### JavaScript

```javascript
const response = await fetch('https://peertube2.cpy.re/api/v1/video-channels?count=15', {
  method: 'GET',
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get('https://peertube2.cpy.re/api/v1/video-channels?count=15')
print(response.text)
```


## Create a video channel

`POST /api/v1/video-channels`

Authentication (security requirement alternatives):

```json
[
  {
    "OAuth2": []
  }
]
```

- OAuth2: oauth2. Authenticating via OAuth requires the following steps:
- Have an activated account
- [Generate] an access token for that account at `/api/v1/users/token`.
- Make requests with the *Authorization: Bearer <token\>* header
- Profit, depending on the role assigned to the account

Note that the __access token is valid for 1 day__ and is given
along with a __refresh token valid for 2 weeks__.

[Generate]: https://docs.joinpeertube.org/api/rest-getting-started


Request body: application/json

Type: VideoChannelEdit & any

Schema: [VideoChannelCreate](https://docs.joinpeertube.org/api-rest-reference/api/models/videochannelcreate.md)

allOf:
  Reference: [VideoChannelEdit](https://docs.joinpeertube.org/api-rest-reference/api/models/videochanneledit.md); Type: VideoChannelEdit

  Type: any
  
  - `name` (optional)
    Type: usernameChannel
    
    username of the channel to create
    
    allOf:
      Reference: [usernameChannel](https://docs.joinpeertube.org/api-rest-reference/api/models/usernamechannel.md); Type: usernameChannel
      
      immutable name of the channel, used to interact with its actor
      
      minLength: 1
      
      maxLength: 50
      
      pattern: "/^[a-zA-Z0-9\\\\-_.:]+$/"
      
      Example:
      
      ```json
      "framasoft_videos"
      ```

Responses:

- 200: successful operation

Content type: application/json

Type: object

- `videoChannel` (optional)
  Type: object
  
  - `id` (optional)
    Reference: [id](https://docs.joinpeertube.org/api-rest-reference/api/models/id.md); Type: id
    
    minimum: 1
    
    Example:
    
    ```json
    42
    ```

## Examples

### cURL

```bash
curl -X POST 'https://peertube2.cpy.re/api/v1/video-channels' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "publicEmail": "user@example.com"
}'
```

### JavaScript

```javascript
const body = `{
  "publicEmail": "user@example.com"
}`;

const response = await fetch('https://peertube2.cpy.re/api/v1/video-channels', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "publicEmail": "user@example.com"
}'''

response = requests.post(
    'https://peertube2.cpy.re/api/v1/video-channels',
    data=body.encode('utf-8'),
    headers={
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```


## Get a video channel

`GET /api/v1/video-channels/{channelHandle}`

Authentication: no security requirement declared for this operation.

Parameters:

- `channelHandle` (path, string, required) - The video channel handle
  Type: string
  
  Example:
  
  ```json
  "my_username | my_username@example.com"
  ```

Responses:

- 200: successful operation

Content type: application/json

Type: Actor & object

Schema: [VideoChannel](https://docs.joinpeertube.org/api-rest-reference/api/models/videochannel.md)

allOf:
  Reference: [Actor](https://docs.joinpeertube.org/api-rest-reference/api/models/actor.md); Type: Actor

  Type: object
  
  - `displayName` (optional)
    Type: string
    
    editable name of the channel, displayed in its representations
    
    minLength: 1
    
    maxLength: 120
    
    Example:
    
    ```json
    "Videos of Framasoft"
    ```
  
  - `description` (optional)
    Type: string; nullable
    
    minLength: 3
    
    maxLength: 1000
    
    Example:
    
    ```json
    "Videos made with <3 by Framasoft"
    ```
  
  - `support` (optional)
    Type: string; nullable
    
    text shown by default on all videos of this channel, to tell the audience how to support it
    
    minLength: 3
    
    maxLength: 1000
    
    Example:
    
    ```json
    "Please support our work on https://soutenir.framasoft.org/en/ <3"
    ```
  
  - `publicEmail` (optional)
    Type: string, email; nullable
    
    Public email visible in podcast RSS feeds
  
  - `isLocal` (optional)
    Type: boolean
  
  - `updatedAt` (optional)
    Type: string, date-time
  
  - `banners` (optional)
    Type: Array<ActorImage>
    
    Items:
      Reference: [ActorImage](https://docs.joinpeertube.org/api-rest-reference/api/models/actorimage.md); Type: ActorImage
  
  - `ownerAccount` (optional)
    Reference: [Account](https://docs.joinpeertube.org/api-rest-reference/api/models/account.md); Type: Actor & any
  
  - `videosCount` (optional)
    Type: integer
    
    only included when `withStats` is true
  
  - `viewsPerDay` (optional)
    Type: Array<object>
    
    only included when `withStats` is true. Chronologically ordered, spans the whole `statsDays` range. Each point aggregates `viewsGroupInterval` worth of views, starting at `date`
    
    
    Items:
      Type: object
      
      - `date` (optional)
        Type: string, date-time
      
      - `views` (optional)
        Type: integer
  
  - `viewsGroupInterval` (optional)
    Type: string
    
    bucket size of `viewsPerDay`, only included when `withStats` is true
    
    enum: ["day","week","month"]
  
  - `totalViews` (optional)
    Type: integer
    
    lifetime views of all the channel videos, only included when `withStats` is true

## Examples

### cURL

```bash
curl -X GET 'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com'
```

### JavaScript

```javascript
const response = await fetch('https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com', {
  method: 'GET',
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get('https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com')
print(response.text)
```


## Update a video channel

`PUT /api/v1/video-channels/{channelHandle}`

Authentication (security requirement alternatives):

```json
[
  {
    "OAuth2": []
  }
]
```

- OAuth2: oauth2. Authenticating via OAuth requires the following steps:
- Have an activated account
- [Generate] an access token for that account at `/api/v1/users/token`.
- Make requests with the *Authorization: Bearer <token\>* header
- Profit, depending on the role assigned to the account

Note that the __access token is valid for 1 day__ and is given
along with a __refresh token valid for 2 weeks__.

[Generate]: https://docs.joinpeertube.org/api/rest-getting-started


Parameters:

- `channelHandle` (path, string, required) - The video channel handle
  Type: string
  
  Example:
  
  ```json
  "my_username | my_username@example.com"
  ```

Request body: application/json

Type: VideoChannelEdit & any

Schema: [VideoChannelUpdate](https://docs.joinpeertube.org/api-rest-reference/api/models/videochannelupdate.md)

allOf:
  Reference: [VideoChannelEdit](https://docs.joinpeertube.org/api-rest-reference/api/models/videochanneledit.md); Type: VideoChannelEdit

  Type: any
  
  - `bulkVideosSupportUpdate` (optional)
    Type: boolean
    
    Update the support field for all videos of this channel

Responses:

- 204: successful operation

## Examples

### cURL

```bash
curl -X PUT 'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "publicEmail": "user@example.com",
  "bulkVideosSupportUpdate": true
}'
```

### JavaScript

```javascript
const body = `{
  "publicEmail": "user@example.com",
  "bulkVideosSupportUpdate": true
}`;

const response = await fetch('https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "publicEmail": "user@example.com",
  "bulkVideosSupportUpdate": true
}'''

response = requests.put(
    'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com',
    data=body.encode('utf-8'),
    headers={
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```


## Delete a video channel

`DELETE /api/v1/video-channels/{channelHandle}`

Authentication (security requirement alternatives):

```json
[
  {
    "OAuth2": []
  }
]
```

- OAuth2: oauth2. Authenticating via OAuth requires the following steps:
- Have an activated account
- [Generate] an access token for that account at `/api/v1/users/token`.
- Make requests with the *Authorization: Bearer <token\>* header
- Profit, depending on the role assigned to the account

Note that the __access token is valid for 1 day__ and is given
along with a __refresh token valid for 2 weeks__.

[Generate]: https://docs.joinpeertube.org/api/rest-getting-started


Parameters:

- `channelHandle` (path, string, required) - The video channel handle
  Type: string
  
  Example:
  
  ```json
  "my_username | my_username@example.com"
  ```

Responses:

- 204: successful operation

## Examples

### cURL

```bash
curl -X DELETE 'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com', {
  method: 'DELETE',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.delete(
    'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com',
    headers={
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## List activities of a video channel

`GET /api/v1/video-channels/{channelHandle}/activities`

**PeerTube >= 8.0**

Authentication: no security requirement declared for this operation.

Parameters:

- `channelHandle` (path, string, required) - The video channel handle
  Type: string
  
  Example:
  
  ```json
  "my_username | my_username@example.com"
  ```

- `start` (query, integer, optional) - Offset used to paginate results
  Type: integer
  
  minimum: 0

- `count` (query, integer, optional) - Number of items to return
  Type: integer
  
  default: 15
  
  minimum: 1
  
  maximum: 100

- `sort` (query, string, optional) - Sort column
  Type: string
  
  Example:
  
  ```json
  "-createdAt"
  ```

Responses:

- 200: successful operation

Content type: application/json

Type: ChannelActivityListResponse

Schema: [ChannelActivityListResponse](https://docs.joinpeertube.org/api-rest-reference/api/models/channelactivitylistresponse.md)

- `total` (optional)
  Type: integer
  
  Example:
  
  ```json
  1
  ```

- `data` (optional)
  Type: Array<object>
  
  Items:
    Type: object
    
    - `id` (optional)
      Type: integer
    
    - `account` (optional)
      Reference: [AccountSummary](https://docs.joinpeertube.org/api-rest-reference/api/models/accountsummary.md); Type: AccountSummary; nullable
      
      The account may have been deleted
    
    - `action` (optional)
      Type: object
      
      - `id` (optional)
        Reference: [VideoChannelActivityAction](https://docs.joinpeertube.org/api-rest-reference/api/models/videochannelactivityaction.md); Type: VideoChannelActivityAction
        
        The activity action:
          - CREATE: 1
          - UPDATE: 2
          - DELETE: 3
          - UPDATE_CAPTIONS: 4
          - UPDATE_CHAPTERS: 5
          - UPDATE_PASSWORDS: 6
          - CREATE_STUDIO_TASKS: 7
          - UPDATE_SOURCE_FILE: 8
          - UPDATE_ELEMENTS: 9
          - REMOVE_CHANNEL_OWNERSHIP: 10
          - CREATE_CHANNEL_OWNERSHIP: 11
        
        
        enum: [1,2,3,4,5,6,7,8,9,10,11]
      
      - `label` (optional)
        Type: string
    
    - `targetType` (optional)
      Type: object
      
      - `id` (optional)
        Reference: [VideoChannelActivityTarget](https://docs.joinpeertube.org/api-rest-reference/api/models/videochannelactivitytarget.md); Type: VideoChannelActivityTarget
        
        The activity target:
          - VIDEO: 1,
          - PLAYLIST: 2,
          - CHANNEL: 3,
          - CHANNEL_SYNC: 4,
          - VIDEO_IMPORT: 5
        
        
        enum: [1,2,3,4,5]
      
      - `label` (optional)
        Type: string
    
    - `details` (optional)
      Type: object
      
      Additional properties: true
    
    - `createdAt` (optional)
      Type: string, date-time
    
    - `channel` (optional)
      Type: object
      
      - `id` (optional)
        Reference: [id](https://docs.joinpeertube.org/api-rest-reference/api/models/id.md); Type: id
        
        minimum: 1
        
        Example:
        
        ```json
        42
        ```
      
      - `name` (optional)
        Type: string
      
      - `displayName` (optional)
        Type: string
      
      - `url` (optional)
        Type: string, url
    
    - `video` (optional)
      Type: object; nullable
      
      - `id` (optional)
        Reference: [id](https://docs.joinpeertube.org/api-rest-reference/api/models/id.md); Type: id
        
        minimum: 1
        
        Example:
        
        ```json
        42
        ```
      
      - `name` (optional)
        Type: string
      
      - `uuid` (optional)
        Reference: [UUIDv4](https://docs.joinpeertube.org/api-rest-reference/api/models/uuidv4.md); Type: UUIDv4, uuid
        
        minLength: 36
        
        maxLength: 36
        
        pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
        
        Example:
        
        ```json
        "9c9de5e8-0a1e-484a-b099-e80766180a6d"
        ```
      
      - `shortUUID` (optional)
        Reference: [shortUUID](https://docs.joinpeertube.org/api-rest-reference/api/models/shortuuid.md); Type: shortUUID
        
        translation of a uuid v4 with a bigger alphabet to have a shorter uuid
        
        Example:
        
        ```json
        "2y84q2MQUMWPbiEcxNXMgC"
        ```
      
      - `url` (optional)
        Type: string, url
      
      - `isLive` (optional)
        Type: boolean
    
    - `videoImport` (optional)
      Type: object; nullable
      
      - `id` (optional)
        Reference: [id](https://docs.joinpeertube.org/api-rest-reference/api/models/id.md); Type: id
        
        minimum: 1
        
        Example:
        
        ```json
        42
        ```
      
      - `name` (optional)
        Type: string
      
      - `uuid` (optional)
        Reference: [UUIDv4](https://docs.joinpeertube.org/api-rest-reference/api/models/uuidv4.md); Type: UUIDv4, uuid
        
        minLength: 36
        
        maxLength: 36
        
        pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
        
        Example:
        
        ```json
        "9c9de5e8-0a1e-484a-b099-e80766180a6d"
        ```
      
      - `shortUUID` (optional)
        Reference: [shortUUID](https://docs.joinpeertube.org/api-rest-reference/api/models/shortuuid.md); Type: shortUUID
        
        translation of a uuid v4 with a bigger alphabet to have a shorter uuid
        
        Example:
        
        ```json
        "2y84q2MQUMWPbiEcxNXMgC"
        ```
      
      - `url` (optional)
        Type: string, url
      
      - `targetUrl` (optional)
        Type: string, uri
    
    - `playlist` (optional)
      Type: object; nullable
      
      - `id` (optional)
        Reference: [id](https://docs.joinpeertube.org/api-rest-reference/api/models/id.md); Type: id
        
        minimum: 1
        
        Example:
        
        ```json
        42
        ```
      
      - `name` (optional)
        Type: string
      
      - `uuid` (optional)
        Reference: [UUIDv4](https://docs.joinpeertube.org/api-rest-reference/api/models/uuidv4.md); Type: UUIDv4, uuid
        
        minLength: 36
        
        maxLength: 36
        
        pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
        
        Example:
        
        ```json
        "9c9de5e8-0a1e-484a-b099-e80766180a6d"
        ```
      
      - `shortUUID` (optional)
        Reference: [shortUUID](https://docs.joinpeertube.org/api-rest-reference/api/models/shortuuid.md); Type: shortUUID
        
        translation of a uuid v4 with a bigger alphabet to have a shorter uuid
        
        Example:
        
        ```json
        "2y84q2MQUMWPbiEcxNXMgC"
        ```
      
      - `url` (optional)
        Type: string, url
    
    - `channelSync` (optional)
      Type: object; nullable
      
      - `id` (optional)
        Reference: [id](https://docs.joinpeertube.org/api-rest-reference/api/models/id.md); Type: id
        
        minimum: 1
        
        Example:
        
        ```json
        42
        ```
      
      - `externalChannelUrl` (optional)
        Type: string, uri

## Examples

### cURL

```bash
curl -X GET 'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/activities?count=15'
```

### JavaScript

```javascript
const response = await fetch('https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/activities?count=15', {
  method: 'GET',
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get('https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/activities?count=15')
print(response.text)
```


## List playlists of a channel

`GET /api/v1/video-channels/{channelHandle}/video-playlists`

Authentication: no security requirement declared for this operation.

Parameters:

- `channelHandle` (path, string, required) - The video channel handle
  Type: string
  
  Example:
  
  ```json
  "my_username | my_username@example.com"
  ```

- `start` (query, integer, optional) - Offset used to paginate results
  Type: integer
  
  minimum: 0

- `count` (query, integer, optional) - Number of items to return
  Type: integer
  
  default: 15
  
  minimum: 1
  
  maximum: 100

- `sort` (query, string, optional) - Sort column
  Type: string
  
  Example:
  
  ```json
  "-createdAt"
  ```

- `playlistType` (query, VideoPlaylistTypeSet, optional)
  Type: VideoPlaylistTypeSet
  
  The video playlist type (Regular = `1`, Watch Later = `2`)
  
  Schema: [VideoPlaylistTypeSet](https://docs.joinpeertube.org/api-rest-reference/api/models/videoplaylisttypeset.md)
  
  enum: [1,2]

Responses:

- 200: successful operation

Content type: application/json

Type: object

- `total` (optional)
  Type: integer
  
  Example:
  
  ```json
  1
  ```

- `data` (optional)
  Type: Array<VideoPlaylist>
  
  Items:
    Reference: [VideoPlaylist](https://docs.joinpeertube.org/api-rest-reference/api/models/videoplaylist.md); Type: VideoPlaylist

## Examples

### cURL

```bash
curl -X GET 'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/video-playlists?count=15'
```

### JavaScript

```javascript
const response = await fetch('https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/video-playlists?count=15', {
  method: 'GET',
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get('https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/video-playlists?count=15')
print(response.text)
```


## Reorder channel playlists

`POST /api/v1/video-channels/{channelHandle}/video-playlists/reorder`

Authentication (security requirement alternatives):

```json
[
  {
    "OAuth2": []
  }
]
```

- OAuth2: oauth2. Authenticating via OAuth requires the following steps:
- Have an activated account
- [Generate] an access token for that account at `/api/v1/users/token`.
- Make requests with the *Authorization: Bearer <token\>* header
- Profit, depending on the role assigned to the account

Note that the __access token is valid for 1 day__ and is given
along with a __refresh token valid for 2 weeks__.

[Generate]: https://docs.joinpeertube.org/api/rest-getting-started


Parameters:

- `channelHandle` (path, string, required) - The video channel handle
  Type: string
  
  Example:
  
  ```json
  "my_username | my_username@example.com"
  ```

Request body: application/json

Type: object

- `startPosition` (required)
  Type: integer
  
  Start position of the element to reorder
  
  minimum: 1

- `insertAfterPosition` (required)
  Type: integer
  
  New position for the block to reorder, to add the block before the first element
  
  minimum: 0

- `reorderLength` (optional)
  Type: integer
  
  How many element from `startPosition` to reorder
  
  minimum: 1

Responses:

- 204: successful operation

## Examples

### cURL

```bash
curl -X POST 'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/video-playlists/reorder' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "startPosition": 1,
  "insertAfterPosition": 0,
  "reorderLength": 1
}'
```

### JavaScript

```javascript
const body = `{
  "startPosition": 1,
  "insertAfterPosition": 0,
  "reorderLength": 1
}`;

const response = await fetch('https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/video-playlists/reorder', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "startPosition": 1,
  "insertAfterPosition": 0,
  "reorderLength": 1
}'''

response = requests.post(
    'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/video-playlists/reorder',
    data=body.encode('utf-8'),
    headers={
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```


## List followers of a video channel

`GET /api/v1/video-channels/{channelHandle}/followers`

Authentication (security requirement alternatives):

```json
[
  {
    "OAuth2": []
  }
]
```

- OAuth2: oauth2. Authenticating via OAuth requires the following steps:
- Have an activated account
- [Generate] an access token for that account at `/api/v1/users/token`.
- Make requests with the *Authorization: Bearer <token\>* header
- Profit, depending on the role assigned to the account

Note that the __access token is valid for 1 day__ and is given
along with a __refresh token valid for 2 weeks__.

[Generate]: https://docs.joinpeertube.org/api/rest-getting-started


Parameters:

- `channelHandle` (path, string, required) - The video channel handle
  Type: string
  
  Example:
  
  ```json
  "my_username | my_username@example.com"
  ```

- `start` (query, integer, optional) - Offset used to paginate results
  Type: integer
  
  minimum: 0

- `count` (query, integer, optional) - Number of items to return
  Type: integer
  
  default: 15
  
  minimum: 1
  
  maximum: 100

- `sort` (query, string, optional) - Sort followers by criteria
  Type: string
  
  enum: ["createdAt"]

- `search` (query, string, optional) - Plain text search, applied to various parts of the model depending on endpoint
  Type: string

Responses:

- 200: successful operation

Content type: application/json

Type: object

- `total` (optional)
  Type: integer
  
  Example:
  
  ```json
  1
  ```

- `data` (optional)
  Type: Array<Follow>
  
  Items:
    Reference: [Follow](https://docs.joinpeertube.org/api-rest-reference/api/models/follow.md); Type: Follow

## Examples

### cURL

```bash
curl -X GET 'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/followers?count=15' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/followers?count=15', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/followers?count=15',
    headers={
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Update channel avatar

`POST /api/v1/video-channels/{channelHandle}/avatar/pick`

Authentication (security requirement alternatives):

```json
[
  {
    "OAuth2": []
  }
]
```

- OAuth2: oauth2. Authenticating via OAuth requires the following steps:
- Have an activated account
- [Generate] an access token for that account at `/api/v1/users/token`.
- Make requests with the *Authorization: Bearer <token\>* header
- Profit, depending on the role assigned to the account

Note that the __access token is valid for 1 day__ and is given
along with a __refresh token valid for 2 weeks__.

[Generate]: https://docs.joinpeertube.org/api/rest-getting-started


Parameters:

- `channelHandle` (path, string, required) - The video channel handle
  Type: string
  
  Example:
  
  ```json
  "my_username | my_username@example.com"
  ```

Request body: multipart/form-data

Type: object

- `avatarfile` (optional)
  Type: string, binary
  
  The file to upload.

Responses:

- 200: successful operation

Content type: application/json

Type: object

- `avatars` (optional)
  Type: Array<ActorImage>
  
  Items:
    Reference: [ActorImage](https://docs.joinpeertube.org/api-rest-reference/api/models/actorimage.md); Type: ActorImage

- 413: image file too large

## Examples

### cURL

```bash
curl -X POST 'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/avatar/pick' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const form = new FormData();
const response = await fetch('https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/avatar/pick', {
  method: 'POST',
  headers: {"Authorization":"Bearer YOUR_TOKEN"},
  body: form,
});
console.log(await response.text());
```

### Python

```python
import requests
from contextlib import ExitStack

with ExitStack() as stack:
    files = [
    ]
    response = requests.request('POST', 'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/avatar/pick', headers={"Authorization":"Bearer YOUR_TOKEN"}, files=files)
    print(response.text)
```


## Delete channel avatar

`DELETE /api/v1/video-channels/{channelHandle}/avatar`

Authentication (security requirement alternatives):

```json
[
  {
    "OAuth2": []
  }
]
```

- OAuth2: oauth2. Authenticating via OAuth requires the following steps:
- Have an activated account
- [Generate] an access token for that account at `/api/v1/users/token`.
- Make requests with the *Authorization: Bearer <token\>* header
- Profit, depending on the role assigned to the account

Note that the __access token is valid for 1 day__ and is given
along with a __refresh token valid for 2 weeks__.

[Generate]: https://docs.joinpeertube.org/api/rest-getting-started


Parameters:

- `channelHandle` (path, string, required) - The video channel handle
  Type: string
  
  Example:
  
  ```json
  "my_username | my_username@example.com"
  ```

Responses:

- 204: successful operation

## Examples

### cURL

```bash
curl -X DELETE 'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/avatar' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/avatar', {
  method: 'DELETE',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.delete(
    'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/avatar',
    headers={
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Update channel banner

`POST /api/v1/video-channels/{channelHandle}/banner/pick`

Authentication (security requirement alternatives):

```json
[
  {
    "OAuth2": []
  }
]
```

- OAuth2: oauth2. Authenticating via OAuth requires the following steps:
- Have an activated account
- [Generate] an access token for that account at `/api/v1/users/token`.
- Make requests with the *Authorization: Bearer <token\>* header
- Profit, depending on the role assigned to the account

Note that the __access token is valid for 1 day__ and is given
along with a __refresh token valid for 2 weeks__.

[Generate]: https://docs.joinpeertube.org/api/rest-getting-started


Parameters:

- `channelHandle` (path, string, required) - The video channel handle
  Type: string
  
  Example:
  
  ```json
  "my_username | my_username@example.com"
  ```

Request body: multipart/form-data

Type: object

- `bannerfile` (optional)
  Type: string, binary
  
  The file to upload.

Responses:

- 200: successful operation

Content type: application/json

Type: object

- `banners` (optional)
  Type: Array<ActorImage>
  
  Items:
    Reference: [ActorImage](https://docs.joinpeertube.org/api-rest-reference/api/models/actorimage.md); Type: ActorImage

- 413: image file too large

## Examples

### cURL

```bash
curl -X POST 'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/banner/pick' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const form = new FormData();
const response = await fetch('https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/banner/pick', {
  method: 'POST',
  headers: {"Authorization":"Bearer YOUR_TOKEN"},
  body: form,
});
console.log(await response.text());
```

### Python

```python
import requests
from contextlib import ExitStack

with ExitStack() as stack:
    files = [
    ]
    response = requests.request('POST', 'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/banner/pick', headers={"Authorization":"Bearer YOUR_TOKEN"}, files=files)
    print(response.text)
```


## Delete channel banner

`DELETE /api/v1/video-channels/{channelHandle}/banner`

Authentication (security requirement alternatives):

```json
[
  {
    "OAuth2": []
  }
]
```

- OAuth2: oauth2. Authenticating via OAuth requires the following steps:
- Have an activated account
- [Generate] an access token for that account at `/api/v1/users/token`.
- Make requests with the *Authorization: Bearer <token\>* header
- Profit, depending on the role assigned to the account

Note that the __access token is valid for 1 day__ and is given
along with a __refresh token valid for 2 weeks__.

[Generate]: https://docs.joinpeertube.org/api/rest-getting-started


Parameters:

- `channelHandle` (path, string, required) - The video channel handle
  Type: string
  
  Example:
  
  ```json
  "my_username | my_username@example.com"
  ```

Responses:

- 204: successful operation

## Examples

### cURL

```bash
curl -X DELETE 'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/banner' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/banner', {
  method: 'DELETE',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.delete(
    'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/banner',
    headers={
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Import videos in channel

`POST /api/v1/video-channels/{channelHandle}/import-videos`

Import a remote channel/playlist videos into a channel

Authentication (security requirement alternatives):

```json
[
  {
    "OAuth2": []
  }
]
```

- OAuth2: oauth2. Authenticating via OAuth requires the following steps:
- Have an activated account
- [Generate] an access token for that account at `/api/v1/users/token`.
- Make requests with the *Authorization: Bearer <token\>* header
- Profit, depending on the role assigned to the account

Note that the __access token is valid for 1 day__ and is given
along with a __refresh token valid for 2 weeks__.

[Generate]: https://docs.joinpeertube.org/api/rest-getting-started


Parameters:

- `channelHandle` (path, string, required) - The video channel handle
  Type: string
  
  Example:
  
  ```json
  "my_username | my_username@example.com"
  ```

Request body: application/json

Type: ImportVideosInChannelCreate

Schema: [ImportVideosInChannelCreate](https://docs.joinpeertube.org/api-rest-reference/api/models/importvideosinchannelcreate.md)

- `externalChannelUrl` (required)
  Type: string
  
  Example:
  
  ```json
  "https://youtube.com/c/UC_myfancychannel"
  ```

- `videoChannelSyncId` (optional)
  Type: integer
  
  If part of a channel sync process, specify its id to assign video imports to this channel synchronization

Responses:

- 204: successful operation

## Examples

### cURL

```bash
curl -X POST 'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/import-videos' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "externalChannelUrl": "https://youtube.com/c/UC_myfancychannel",
  "videoChannelSyncId": 0
}'
```

### JavaScript

```javascript
const body = `{
  "externalChannelUrl": "https://youtube.com/c/UC_myfancychannel",
  "videoChannelSyncId": 0
}`;

const response = await fetch('https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/import-videos', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "externalChannelUrl": "https://youtube.com/c/UC_myfancychannel",
  "videoChannelSyncId": 0
}'''

response = requests.post(
    'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/import-videos',
    data=body.encode('utf-8'),
    headers={
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```


## Search channels

`GET /api/v1/search/video-channels`

Authentication: no security requirement declared for this operation.

Parameters:

- `search` (query, string, required) - String to search. If the user can make a remote URI search, and the string is an URI then the PeerTube instance will fetch the remote object and add it to its database. Then, you can use the REST API to fetch the complete channel information and interact with it.

  Type: string

- `start` (query, integer, optional) - Offset used to paginate results
  Type: integer
  
  minimum: 0

- `count` (query, integer, optional) - Number of items to return
  Type: integer
  
  default: 15
  
  minimum: 1
  
  maximum: 100

- `searchTarget` (query, string, optional) - If the administrator enabled search index support, you can override the default search target.

**Warning**: If you choose to make an index search, PeerTube will get results from a third party service. It means the instance may not yet know the objects you fetched. If you want to load video/channel information:
  * If the current user has the ability to make a remote URI search (this information is available in the config endpoint),
  then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database.
  After that, you can use the classic REST API endpoints to fetch the complete object or interact with it
  * If the current user doesn't have the ability to make a remote URI search, then redirect the user on the origin instance or fetch
  the data from the origin instance API

  Type: string
  
  enum: ["local","search-index"]

- `sort` (query, string, optional) - Sort column
  Type: string
  
  Example:
  
  ```json
  "-createdAt"
  ```

- `host` (query, string, optional) - Find elements owned by this host
  Type: string

- `handles` (query, any, optional) - Find elements with these handles
  Type: any
  
  Items:
    Type: string

Responses:

- 200: successful operation

Content type: application/json

Type: VideoChannelList

Schema: [VideoChannelList](https://docs.joinpeertube.org/api-rest-reference/api/models/videochannellist.md)

- `total` (optional)
  Type: integer
  
  Example:
  
  ```json
  1
  ```

- `data` (optional)
  Type: Array<Actor & object & Actor>
  
  Items:
    Type: Actor & object & Actor
    
    allOf:
      Reference: [VideoChannel](https://docs.joinpeertube.org/api-rest-reference/api/models/videochannel.md); Type: Actor & object
    
      Reference: [Actor](https://docs.joinpeertube.org/api-rest-reference/api/models/actor.md); Type: Actor

- 500: search index unavailable

## Examples

### cURL

```bash
curl -X GET 'https://peertube2.cpy.re/api/v1/search/video-channels?search=string&count=15'
```

### JavaScript

```javascript
const response = await fetch('https://peertube2.cpy.re/api/v1/search/video-channels?search=string&count=15', {
  method: 'GET',
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get('https://peertube2.cpy.re/api/v1/search/video-channels?search=string&count=15')
print(response.text)
```


## List channel collaborators

`GET /api/v1/video-channels/{channelHandle}/collaborators`

**PeerTube >= 8.0**

Authentication (security requirement alternatives):

```json
[
  {
    "OAuth2": []
  }
]
```

- OAuth2: oauth2. Authenticating via OAuth requires the following steps:
- Have an activated account
- [Generate] an access token for that account at `/api/v1/users/token`.
- Make requests with the *Authorization: Bearer <token\>* header
- Profit, depending on the role assigned to the account

Note that the __access token is valid for 1 day__ and is given
along with a __refresh token valid for 2 weeks__.

[Generate]: https://docs.joinpeertube.org/api/rest-getting-started


Parameters:

- `channelHandle` (path, string, required) - The video channel handle
  Type: string
  
  Example:
  
  ```json
  "my_username | my_username@example.com"
  ```

Responses:

- 200: successful operation

Content type: application/json

Type: object

- `total` (optional)
  Type: integer
  
  Example:
  
  ```json
  1
  ```

- `data` (optional)
  Type: Array<VideoChannelCollaborator>
  
  Items:
    Reference: [VideoChannelCollaborator](https://docs.joinpeertube.org/api-rest-reference/api/models/videochannelcollaborator.md); Type: VideoChannelCollaborator
    
    Representation of a channel collaboration

## Examples

### cURL

```bash
curl -X GET 'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/collaborators' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/collaborators', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/collaborators',
    headers={
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Invite a collaborator

`POST /api/v1/video-channels/{channelHandle}/collaborators/invite`

**PeerTube >= 8.0**  Invite a local user to collaborate on the specified video channel.

Authentication (security requirement alternatives):

```json
[
  {
    "OAuth2": []
  }
]
```

- OAuth2: oauth2. Authenticating via OAuth requires the following steps:
- Have an activated account
- [Generate] an access token for that account at `/api/v1/users/token`.
- Make requests with the *Authorization: Bearer <token\>* header
- Profit, depending on the role assigned to the account

Note that the __access token is valid for 1 day__ and is given
along with a __refresh token valid for 2 weeks__.

[Generate]: https://docs.joinpeertube.org/api/rest-getting-started


Parameters:

- `channelHandle` (path, string, required) - The video channel handle
  Type: string
  
  Example:
  
  ```json
  "my_username | my_username@example.com"
  ```

Request body: application/json (required)

Type: object

- `accountHandle` (optional)
  Type: string
  
  Local user username to invite

Responses:

- 200: Collaborator invited

Content type: application/json

Type: object

- `collaborator` (optional)
  Reference: [VideoChannelCollaborator](https://docs.joinpeertube.org/api-rest-reference/api/models/videochannelcollaborator.md); Type: VideoChannelCollaborator
  
  Representation of a channel collaboration

## Examples

### cURL

```bash
curl -X POST 'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/collaborators/invite' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "accountHandle": "string"
}'
```

### JavaScript

```javascript
const body = `{
  "accountHandle": "string"
}`;

const response = await fetch('https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/collaborators/invite', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "accountHandle": "string"
}'''

response = requests.post(
    'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/collaborators/invite',
    data=body.encode('utf-8'),
    headers={
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```


## Accept a collaboration invitation

`POST /api/v1/video-channels/{channelHandle}/collaborators/{collaboratorId}/accept`

**PeerTube >= 8.0**

Authentication (security requirement alternatives):

```json
[
  {
    "OAuth2": []
  }
]
```

- OAuth2: oauth2. Authenticating via OAuth requires the following steps:
- Have an activated account
- [Generate] an access token for that account at `/api/v1/users/token`.
- Make requests with the *Authorization: Bearer <token\>* header
- Profit, depending on the role assigned to the account

Note that the __access token is valid for 1 day__ and is given
along with a __refresh token valid for 2 weeks__.

[Generate]: https://docs.joinpeertube.org/api/rest-getting-started


Parameters:

- `channelHandle` (path, string, required) - The video channel handle
  Type: string
  
  Example:
  
  ```json
  "my_username | my_username@example.com"
  ```

- `collaboratorId` (path, id, required) - The collaborator id
  Type: id
  
  Schema: [id](https://docs.joinpeertube.org/api-rest-reference/api/models/id.md)
  
  minimum: 1
  
  Example:
  
  ```json
  42
  ```

Responses:

- 204: Collaboration accepted

## Examples

### cURL

```bash
curl -X POST 'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/collaborators/42/accept' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/collaborators/42/accept', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.post(
    'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/collaborators/42/accept',
    headers={
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Reject a collaboration invitation

`POST /api/v1/video-channels/{channelHandle}/collaborators/{collaboratorId}/reject`

**PeerTube >= 8.0**

Authentication (security requirement alternatives):

```json
[
  {
    "OAuth2": []
  }
]
```

- OAuth2: oauth2. Authenticating via OAuth requires the following steps:
- Have an activated account
- [Generate] an access token for that account at `/api/v1/users/token`.
- Make requests with the *Authorization: Bearer <token\>* header
- Profit, depending on the role assigned to the account

Note that the __access token is valid for 1 day__ and is given
along with a __refresh token valid for 2 weeks__.

[Generate]: https://docs.joinpeertube.org/api/rest-getting-started


Parameters:

- `channelHandle` (path, string, required) - The video channel handle
  Type: string
  
  Example:
  
  ```json
  "my_username | my_username@example.com"
  ```

- `collaboratorId` (path, id, required) - The collaborator id
  Type: id
  
  Schema: [id](https://docs.joinpeertube.org/api-rest-reference/api/models/id.md)
  
  minimum: 1
  
  Example:
  
  ```json
  42
  ```

Responses:

- 204: Collaboration rejected

## Examples

### cURL

```bash
curl -X POST 'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/collaborators/42/reject' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/collaborators/42/reject', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.post(
    'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/collaborators/42/reject',
    headers={
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Remove a channel collaborator

`DELETE /api/v1/video-channels/{channelHandle}/collaborators/{collaboratorId}`

**PeerTube >= 8.0** Only the channel owner or the collaborator themselves can remove a collaborator from a channel

Authentication (security requirement alternatives):

```json
[
  {
    "OAuth2": []
  }
]
```

- OAuth2: oauth2. Authenticating via OAuth requires the following steps:
- Have an activated account
- [Generate] an access token for that account at `/api/v1/users/token`.
- Make requests with the *Authorization: Bearer <token\>* header
- Profit, depending on the role assigned to the account

Note that the __access token is valid for 1 day__ and is given
along with a __refresh token valid for 2 weeks__.

[Generate]: https://docs.joinpeertube.org/api/rest-getting-started


Parameters:

- `channelHandle` (path, string, required) - The video channel handle
  Type: string
  
  Example:
  
  ```json
  "my_username | my_username@example.com"
  ```

- `collaboratorId` (path, id, required) - The collaborator id
  Type: id
  
  Schema: [id](https://docs.joinpeertube.org/api-rest-reference/api/models/id.md)
  
  minimum: 1
  
  Example:
  
  ```json
  42
  ```

Responses:

- 204: successful operation

## Examples

### cURL

```bash
curl -X DELETE 'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/collaborators/42' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/collaborators/42', {
  method: 'DELETE',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.delete(
    'https://peertube2.cpy.re/api/v1/video-channels/my_username%20%7C%20my_username%40example.com/collaborators/42',
    headers={
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```
