---
title: "Create a new channel"
method: POST
path: "/channels"
tags: ["channels"]
---

# Create a new channel

`POST /channels`

create a new channel

## Request body

- ChannelCreateRequest
  - `name` string, required
  - `description` string
  - `privacy` 'private' | 'authenticated' | 'public' — channel privacy channel
  - `channel_type` 'default' | 'virtual' — channel type
  - `indexing_behavior` 'default' | 'frozen' — channel indexing behavior
  - `sources` VirtualChannelSource[]
    - `name` string, required
    - `parent_name` string
  - `filters` ChannelFilters — Filter directives for mirroring operation. Fields are optional. Can't have include and exclude licenses together. This attribute is not returned by default in channels list
    - `conda` object
      - `include_licenses` string[] — List of license familities to look for. Empty array means all licenses
      - `exclude_licenses` string[] — List of license familities to look for. Empty array means all licenses
      - `include_specs` string[] — A list of MatchSpec strings, for including from excluded list General format is (channel(/subdir):(namespace):)name(version(build))[key1=value1,key2=value2]
      - `exclude_specs` string[] — A list of MatchSpec strings, for excluding specific packages. General format is (channel(/subdir):(namespace):)name(version(build))[key1=value1,key2=value2]
    - `cran` object
      - `include_licenses` string[] — List of license familities to look for. Empty array means all licenses
      - `exclude_licenses` string[] — List of license familities to look for. Empty array means all licenses
      - `include_specs` string[] — A list of MatchSpec strings, for including from excluded list General format is (channel(/subdir):(namespace):)name(version(build))[key1=value1,key2=value2]
      - `exclude_specs` string[] — A list of MatchSpec strings, for excluding specific packages. General format is (channel(/subdir):(namespace):)name(version(build))[key1=value1,key2=value2]
    - `python` object
      - `include_licenses` string[] — List of license familities to look for. Empty array means all licenses
      - `exclude_licenses` string[] — List of license familities to look for. Empty array means all licenses
      - `include_specs` string[] — A list of MatchSpec strings, for including from excluded list General format is (channel(/subdir):(namespace):)name(version(build))[key1=value1,key2=value2]
      - `exclude_specs` string[] — A list of MatchSpec strings, for excluding specific packages. General format is (channel(/subdir):(namespace):)name(version(build))[key1=value1,key2=value2]
  - `settings` ChannelSettings — Settings for cve notifications and other channel related activities.
    - `cve_notifications` object
      - `cve_score_increase` boolean — Do you want to see cve notifications when cve score increases?
      - `cve_score_decrease` boolean — Do you want to see cve notifications when cve score decreases?
      - `cve_status_change` boolean — Do you want to see cve notifications when cve status changes? Currently by default "active", "mitigated", "cleared" statuses are considered.
      - `cve_score_threshold` number — Threshold value for which score changes should be considered. If the value is -1, then no threshold is considered - Notifications will be shown for any score changes

## Response `201`

successfully created a channel

- Channel — Channel object
  - `id` string
  - `name` string, required
  - `parent` string — if present, the object is supposed to be a subchannel
  - `description` string
  - `privacy` 'private' | 'authenticated' | 'public' — channel privacy channel
  - `channel_type` 'default' | 'virtual' — channel type
  - `indexing_behavior` 'default' | 'frozen' — channel indexing behavior
  - `sources` VirtualChannelSource[]
    - `name` string, required
    - `parent_name` string
  - `created` string — date created
  - `updated` string — date of last update
  - `artifact_count` number — number of artifacts the channel currently has
  - `download_count` number — number of downloads
  - `filters` ChannelFilters — Filter directives for mirroring operation. Fields are optional. Can't have include and exclude licenses together. This attribute is not returned by default in channels list
    - `conda` object
      - `include_licenses` string[] — List of license familities to look for. Empty array means all licenses
      - `exclude_licenses` string[] — List of license familities to look for. Empty array means all licenses
      - `include_specs` string[] — A list of MatchSpec strings, for including from excluded list General format is (channel(/subdir):(namespace):)name(version(build))[key1=value1,key2=value2]
      - `exclude_specs` string[] — A list of MatchSpec strings, for excluding specific packages. General format is (channel(/subdir):(namespace):)name(version(build))[key1=value1,key2=value2]
    - `cran` object
      - `include_licenses` string[] — List of license familities to look for. Empty array means all licenses
      - `exclude_licenses` string[] — List of license familities to look for. Empty array means all licenses
      - `include_specs` string[] — A list of MatchSpec strings, for including from excluded list General format is (channel(/subdir):(namespace):)name(version(build))[key1=value1,key2=value2]
      - `exclude_specs` string[] — A list of MatchSpec strings, for excluding specific packages. General format is (channel(/subdir):(namespace):)name(version(build))[key1=value1,key2=value2]
    - `python` object
      - `include_licenses` string[] — List of license familities to look for. Empty array means all licenses
      - `exclude_licenses` string[] — List of license familities to look for. Empty array means all licenses
      - `include_specs` string[] — A list of MatchSpec strings, for including from excluded list General format is (channel(/subdir):(namespace):)name(version(build))[key1=value1,key2=value2]
      - `exclude_specs` string[] — A list of MatchSpec strings, for excluding specific packages. General format is (channel(/subdir):(namespace):)name(version(build))[key1=value1,key2=value2]

## Other responses

- `400` — Server cannot execute request due to something that is perceived to be a client error
- `401` — Unauthenticated, no token is provided or token is invalid
- `403` — Access is forbidden
- `409` — Creating/updating resource raises a conflict
- `500` — Internal server error

---

[API](https://skmtc.net/anaconda/apis/anaconda-server-api.md) · [All operations](https://skmtc.net/anaconda/apis/anaconda-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/anaconda/anaconda-server-api/versions/6aef0cb7a151/schema)
