Add a new condition to an existing policy's configuration with logical operators
POST /api/private/lifecycle_management/policies/{policy_id}/versions/{version_number}:add_condition`
Add a new condition to an existing policy's configuration. Conditions determine when a policy should execute by evaluating user attributes, system events, or external triggers. Multiple conditions are combined using logical AND operations.
Use this endpoint to:
Add additional triggering criteria to existing policies
Refine policy targeting without replacing entire configuration
Incrementally build complex policy logic
Add new conditions based on changing business requirements
Condition Object Fields
When using condition_type: CONDITION_STRING
, you can use SCIM filter expressions to define complex conditions:
department eq "Engineering"
- User belongs to Engineering department
is_active eq true and department eq "Sales"
- Active user in Sales department
title co "Manager"
- User title contains "Manager"
name
string
Yes
Name of the condition
continue_actions_if_any_error
boolean
No
Whether to continue with other actions if any action fails
state
string
No
Condition state: ENABLED
, DISABLED
startDate gt "2024-01-01"
- Start date is after January 1, 2024
department eq "IT" or department eq "Security"
- User in IT or Security departments
ew
Ends with
email ew "@company.com"
gt
Greater than
salary gt 50000
ge
Greater than or equal
experience ge 5
lt
Less than
age lt 65
le
Less than or equal
projects le 3
policy_id
string
Yes
Unique identifier of the policy
version_number
integer
Yes
Version number of the policy version to modify
workflow
string
Yes
Name of the workflow to add the condition to
condition
object
Yes
Condition object to add
condition_type
string
Yes
Type of condition: ANY
, CONDITION_STRING
condition_string
string
Conditional
SCIM-based condition string (required if condition_type is CONDITION_STRING
)
actions_to_run
array[object]
No
eq
Equal
department eq "Finance"
ne
Not equal
status ne "inactive"
co
Contains
title co "Director"
sw
Starts with
Actions that run when this condition is true
email sw "admin"
curl -X GET "$BASE_URL/api/preview/keys" \
-H "authorization: Bearer $VEZA_TOKEN"
OK
Default error response
{
"value": {
"policy_id": "text",
"version_number": 1,
"state": 1,
"config": {
"workflows": [
{
"trigger_type": 1,
"description": "text",
"trigger_string": "text",
"conditions_on_success": [
{
"condition_type": 1,
"condition_string": "text",
"actions_to_run": [
{
"name": "text",
"type": 1
}
],
"name": "text",
"continue_actions_if_any_error": true,
"state": 1
}
],
"continuous_sync": true,
"name": "text",
"state": 1,
"attribute_to_get_execute_date": "text",
"local_time_zone_diff_from_utc": 1,
"local_time_zone_attribute": "text",
"trigger_at_local_time_hour": 1,
"execute_date_time_formatters": [
{
"date_formatter": "text",
"pipeline_functions": "text"
}
],
"grace_period_in_sec": 1,
"skip_trigger_recheck_after_grace_period": true,
"priority": 1
}
],
"actions": [
{
"name": "text",
"description": "text",
"type": 1,
"config": {
"@type": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"conditions_on_success": [
{
"condition_type": 1,
"condition_string": "text",
"actions_to_run": [
{
"name": "text",
"type": 1
}
],
"name": "text",
"continue_actions_if_any_error": true,
"state": 1
}
],
"action_notification_settings": [
{
"notification_settings": {
"notification_type": 1,
"notification_id": "text",
"type_settings": {
"@type": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
},
"on_success": true,
"on_failure": true
}
],
"state": 1,
"run_once": true
}
],
"attribute_common_transformers": [
{
"name": "text",
"description": "text",
"entity_type": "text",
"entity_attribute_transformers": [
{
"destination_attribute": "text",
"destination_value_formatter": "text",
"continuous_sync": true,
"additional_value_formatter": [
"text"
],
"pipeline_functions": "text",
"unique_identifier": true
}
]
}
],
"lookup_table_references": [
{
"name": "text",
"description": "text",
"column_names": [
"text"
],
"lookup_table_id": "text"
}
],
"mover_properties": [
"text"
],
"password_complexity_rules": [
{
"name": "text",
"length": 1,
"use_special_characters": true,
"use_numbers": true,
"use_uppercase": true,
"use_lowercase": true,
"disallowed_characters": "text"
}
],
"transformer_functions": [
{
"function_expression": "text",
"definition": {
"name": "text",
"description": "text",
"parameters": [
{
"name": "text",
"description": "text",
"type": 1,
"allow_empty": true,
"optional": true,
"valid_values": [
"text"
]
}
],
"require_no_input": true,
"return_multiple_values": true,
"input_is_optional": true
}
}
]
},
"config_version": "text",
"created_by": "text",
"created_at": "2025-08-26T13:34:38.457Z",
"updated_at": "2025-08-26T13:34:38.457Z",
"published_by": "text",
"published_at": "2025-08-26T13:34:38.457Z"
}
}
POST /api/private/lifecycle_management/policies/{policy_id}/versions/{version_number}:add_condition HTTP/1.1
Host: your-tenant.cookiecloud.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 221
{
"policy_id": "text",
"version_number": 1,
"workflow": "text",
"condition": {
"condition_type": 1,
"condition_string": "text",
"actions_to_run": [
{
"name": "text",
"type": 1
}
],
"name": "text",
"continue_actions_if_any_error": true,
"state": 1
}
}