# Creates a Target Create Targets for the given identifier Endpoint: POST /cf/admin/targets Version: 1.0 Security: x-api-key ## Query parameters: - `accountIdentifier` (string, required) Account Identifier - `orgIdentifier` (string, required) Organization Identifier ## Request fields (application/json): - `account` (string, required) The account ID that the target belongs to Example: "abcXDdffdaffd" - `anonymous` (boolean) Indicates if this target is anonymous - `attributes` (object) a JSON representation of the attributes for this target Example: {"age":20,"location":"Belfast"} - `createdAt` (integer) The date and time in milliseconds when this Target was created - `environment` (string, required) The identifier for the environment that the target belongs to - `identifier` (string, required) The unique identifier for this target Example: "john-doe" - `name` (string, required) The name of this Target Example: "John Doe" - `org` (string, required) The identifier for the organization that the target belongs to - `project` (string, required) The identifier for the project that this target belongs to - `segments` (array) A list of Target Groups (Segments) that this Target belongs to - `segments.createdAt` (integer) The data and time in milliseconds when the group was created - `segments.environment` (string) The environment this target group belongs to Example: "Production" - `segments.excluded` (array) A list of Targets who are excluded from this target group - `segments.identifier` (string, required) Unique identifier for the target group. - `segments.included` (array) A list of Targets who belong to this target group - `segments.modifiedAt` (integer) The data and time in milliseconds when the group was last modified - `segments.name` (string, required) Name of the target group. Example: "Beta Testers" - `segments.rules` (array) - `segments.rules.attribute` (string, required) The attribute to use in the clause. This can be any target attribute Example: "identifier" - `segments.rules.id` (string) The unique ID for the clause Example: 32434243 - `segments.rules.negate` (boolean, required) Is the operation negated? - `segments.rules.op` (string, required) The type of operation such as equals, starts_with, contains Example: "starts_with" - `segments.rules.values` (array, required) The values that are compared against the operator - `segments.servingRules` (array) An array of rules that can cause a user to be included in this segment. - `segments.servingRules.clauses` (array, required) A list of clauses to use in the rule - `segments.servingRules.priority` (integer, required) The rules priority relative to other rules. The rules are evaluated in order with 1 being the highest Example: 1 - `segments.servingRules.ruleId` (string, required) The unique identifier for this rule - `segments.tags` (array) Tags for this target group - `segments.tags.identifier` (string, required) The identifier of the tag Example: "feature-flag-tag-1" - `segments.tags.name` (string, required) The name of the tag Example: "feature-flag-tag-1" - `segments.version` (integer) The version of this group. Each time it is modified the version is incremented Example: 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 401 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 ## Response 403 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 ## Response 409 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 500 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