# Create conditions

API to create conditions.

Endpoint: POST /api/v1.1/instances/{instanceId}/conditions
Version: v1.1
Security: AdministrationAccess, ClientAccess

## Security:

  - `AdministrationAccess` (unknown)
    http bearer JWT

  - `ClientAccess` (unknown)
    http bearer JWT

## Path parameters:

  - `instanceId` (string, required)
    The UUID of the Dynamic Monetization instance.

## Request fields (application/json):

  - `conditions` (array)
    List of conditions

  - `conditions.name` (string)
    A human readable name to help a user identify the condition. Not required to be unique.

  - `conditions.operator` (string, required)
    The logical operator to apply.
    Enum: "IN"

  - `conditions.property` (string, required)
    The dictionary key.

  - `conditions.values` (array, required)
    The different values to match.

  - `conditions.conditions` (array, required)
    Conditions to apply according to the logical operator.
Note: The nesting depth is limited to 3 levels.

  - `conditions.conditions.operator` (string, required)
    The logical operator to apply.
    Enum: "NOT"

  - `conditions.conditions.condition` (object, required)
    Condition to apply according to the logical operator.
Note: The nesting depth is limited to 3 levels.

## Request examples:

  - `Example JSON of conditions request body` (unknown)
    A sample list of conditions.

## Response 200:

  - `200` (unknown)
    OK. The request succeeded in its entirety. The response body contains a list of the conditions that were created, existing conditions are not returned.

## Response 200 fields (application/json):

  - `id` (string)
    A generated identifier to uniquely identify the condition.

  - `name` (string)
    A human readable name to help a user identify the condition. Not required to be unique.

  - `operator` (string, required)
    The logical operator to apply.
    Enum: "IN"

  - `property` (string, required)
    The dictionary key.

  - `values` (array, required)
    The different values to match.

  - `conditions` (array, required)
    Conditions to apply according to the logical operator.
Note: The nesting depth is limited to 3 levels.

  - `conditions.operator` (string, required)
    The logical operator to apply.
    Enum: "NOT"

  - `conditions.condition` (object, required)
    Condition to apply according to the logical operator.
Note: The nesting depth is limited to 3 levels.

## Response 400:

  - `400` (unknown)
    Bad Request. Check the request for any errors in the input.

## Response 401:

  - `401` (unknown)
    Unauthorized. Check authentication details.

## Response 403:

  - `403` (unknown)
    Forbidden. The user is forbidden from performing this operation. Check user permissions.

## Response 500:

  - `500` (unknown)
    Internal Server Error. There was an internal error processing the request. If you need to contact support, please include the reference number provided in the response.

## Response 200 examples:

  - `Example JSON of conditions` (unknown)
    A sample list of conditions.

