---
title: "Create Audience"
method: POST
path: "/v1/projects/{project}/audiences"
tags: ["Audiences"]
---

# Create Audience

`POST /v1/projects/{project}/audiences`

Create a new Audience

## Path parameters

- `project` string, required

## Request body

- CreateAudienceDto
  - `name` string — Audience display name, must be set for project-level audiences.
  - `key` string — Audience unique project-level key, must be set for project-level audiences. Must only contain lower-case characters and `_`, `-` or `.`.
  - `description` string — Audience description.
  - `filters` AudienceOperator, required
    - `filters` union[], required — Filters to apply using the "operator" operation
      - union
        - AllFilter
          - `type` 'all', required — Filter type of this audience
        - UserFilter
          - `subType` 'user_id' | 'email' | 'platform' | 'deviceModel', required — Sub type of this filter
          - `comparator` '=' | '!=' | 'exist' | '!exist' | 'contain' | '!contain' | 'startWith' | '!startWith' | 'endWith' | '!endWith', required — Comparator to use
          - `values` string[] — An array of values is required for all filters except when the comparator is 'exist' or '!exist'
          - `type` 'user', required — Filter type of this audience
        - UserCountryFilter
          - `subType` 'country', required — Sub type of this filter
          - `comparator` '=' | '!=' | 'exist' | '!exist' | 'contain' | '!contain' | 'startWith' | '!startWith' | 'endWith' | '!endWith', required — Comparator to use
          - `values` string[] — An array of values is required for all filters except when the comparator is 'exist' or '!exist'
          - `type` 'user', required — Filter type of this audience
        - UserAppVersionFilter
          - `comparator` '=' | '!=' | '>' | '>=' | '<' | '<=' | 'exist' | '!exist', required — Comparator to use
          - `values` string[] — An array of values is required for all filters except when the comparator is 'exist' or '!exist'
          - `type` 'user', required — Filter type of this audience
          - `subType` 'appVersion', required — Sub type of this filter
        - UserPlatformVersionFilter
          - `comparator` '=' | '!=' | '>' | '>=' | '<' | '<=' | 'exist' | '!exist', required — Comparator to use
          - `values` string[] — An array of values is required for all filters except when the comparator is 'exist' or '!exist'
          - `type` 'user', required — Filter type of this audience
          - `subType` 'appVersion', required — Sub type of this filter
        - UserCustomFilter
          - `comparator` '=' | '!=' | '>' | '>=' | '<' | '<=' | 'exist' | '!exist' | 'contain' | '!contain' | 'startWith' | '!startWith' | 'endWith' | '!endWith', required — Comparator to use
          - `dataKey` string, required — Data Key used for custom data
          - `dataKeyType` 'String' | 'Boolean' | 'Number', required — Data Key Type used for custom data
          - `values` object — An array of values is required for all filters except when the comparator is 'exist' or '!exist'
          - `type` 'user', required — Filter type of this audience
          - `subType` 'customData', required — Sub type of this filter
    - `operator` 'and' | 'or', required — Operator type if this object represents an operator, and not a filter
  - `tags` string[] — Tags to organize project-level audiences on the dashboard

## Response `201`

- Audience
  - `name` string — Audience display name, must be set for project-level audiences.
  - `key` string — Audience unique project-level key, must be set for project-level audiences. Must only contain lower-case characters and `_`, `-` or `.`.
  - `description` string — Audience description.
  - `_id` string, required — A unique Audience ID
  - `_project` string, required — The Project owning the Audience
  - `filters` AudienceOperator, required
    - `filters` union[], required — Filters to apply using the "operator" operation
      - union
        - AllFilter
          - `type` 'all', required — Filter type of this audience
        - UserFilter
          - `subType` 'user_id' | 'email' | 'platform' | 'deviceModel', required — Sub type of this filter
          - `comparator` '=' | '!=' | 'exist' | '!exist' | 'contain' | '!contain' | 'startWith' | '!startWith' | 'endWith' | '!endWith', required — Comparator to use
          - `values` string[] — An array of values is required for all filters except when the comparator is 'exist' or '!exist'
          - `type` 'user', required — Filter type of this audience
        - UserCountryFilter
          - `subType` 'country', required — Sub type of this filter
          - `comparator` '=' | '!=' | 'exist' | '!exist' | 'contain' | '!contain' | 'startWith' | '!startWith' | 'endWith' | '!endWith', required — Comparator to use
          - `values` string[] — An array of values is required for all filters except when the comparator is 'exist' or '!exist'
          - `type` 'user', required — Filter type of this audience
        - UserAppVersionFilter
          - `comparator` '=' | '!=' | '>' | '>=' | '<' | '<=' | 'exist' | '!exist', required — Comparator to use
          - `values` string[] — An array of values is required for all filters except when the comparator is 'exist' or '!exist'
          - `type` 'user', required — Filter type of this audience
          - `subType` 'appVersion', required — Sub type of this filter
        - UserPlatformVersionFilter
          - `comparator` '=' | '!=' | '>' | '>=' | '<' | '<=' | 'exist' | '!exist', required — Comparator to use
          - `values` string[] — An array of values is required for all filters except when the comparator is 'exist' or '!exist'
          - `type` 'user', required — Filter type of this audience
          - `subType` 'appVersion', required — Sub type of this filter
        - UserCustomFilter
          - `comparator` '=' | '!=' | '>' | '>=' | '<' | '<=' | 'exist' | '!exist' | 'contain' | '!contain' | 'startWith' | '!startWith' | 'endWith' | '!endWith', required — Comparator to use
          - `dataKey` string, required — Data Key used for custom data
          - `dataKeyType` 'String' | 'Boolean' | 'Number', required — Data Key Type used for custom data
          - `values` object — An array of values is required for all filters except when the comparator is 'exist' or '!exist'
          - `type` 'user', required — Filter type of this audience
          - `subType` 'customData', required — Sub type of this filter
    - `operator` 'and' | 'or', required — Operator type if this object represents an operator, and not a filter
  - `source` 'api' | 'dashboard' | 'importer' | 'github.code_usages' | 'github.pr_insights' | 'gitlab.code_usages' | 'gitlab.pr_insights' | 'bitbucket.code_usages' | 'bitbucket.pr_insights' | 'terraform' | 'cli' | 'slack' | 'mcp' — Source that created the Audience
  - `_createdBy` string — User who created the Audience
  - `createdAt` string, date-time, required — The date the feature was created
  - `updatedAt` string, date-time, required — The date the feature was last updated
  - `tags` string[] — Tags to organize project-level audiences on the dashboard
  - `readonly` boolean, required — Readonly state based on the Users Permission to modify the Audience
  - `hasUsage` boolean — Whether the audience is in use by a feature

## Other responses

- `400`
- `401`
- `403`
- `404`
- `409`

---

[API](https://skmtc.dev/devcycle/apis/devcycle-management-api.md) · [All operations](https://skmtc.dev/devcycle/apis/devcycle-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/devcycle/devcycle-management-api/revisions/d4a127a37608/schema)
