# Creates a Target Group

Creates a Target Group in the given Project

Endpoint: POST /cf/admin/segments
Version: 1.0
Security: x-api-key

## Query parameters:

  - `accountIdentifier` (string, required)
    Account Identifier

  - `orgIdentifier` (string, required)
    Organization Identifier

## Request fields (application/json):

  - `environment` (string, required)

  - `excluded` (array)

  - `identifier` (string)
    Example: "beta-testers"

  - `included` (array)

  - `name` (string, required)
    Name of the target segment.
    Example: "Beta Testers"

  - `project` (string, required)

  - `rules` (array)
    An array of rules that can cause a user to be included in this segment.

  - `rules.attribute` (string, required)
    The attribute to use in the clause.  This can be any target attribute
    Example: "identifier"

  - `rules.id` (string)
    The unique ID for the clause
    Example: 32434243

  - `rules.negate` (boolean, required)
    Is the operation negated?

  - `rules.op` (string, required)
    The type of operation such as equals, starts_with, contains
    Example: "starts_with"

  - `rules.values` (array, required)
    The values that are compared against the operator

  - `servingRules` (array)
    An array of rules that can cause a user to be included in this segment.

  - `servingRules.clauses` (array, required)
    A list of clauses to use in the rule

  - `servingRules.priority` (integer, required)
    The rules priority relative to other rules.  The rules are evaluated in order with 1 being the highest
    Example: 1

  - `servingRules.ruleId` (string, required)
    The unique identifier for this rule

  - `tags` (array)

  - `tags.identifier` (string, required)
    The identifier of the tag
    Example: "feature-flag-tag-1"

  - `tags.name` (string, required)
    The name of the tag
    Example: "feature-flag-tag-1"

## Response 400 fields (application/json):

  - `code` (string, required)
    The http error code
    Example: 404

  - `details` (object)
    Additional details about the error

  - `message` (string, required)
    The reason the request failed
    Example: "Error retrieving projects, organization 'default_org' does not exist"


## Response 201 fields
