Update Policy State
Change policy state to control execution behavior (enable, disable, pause)
Last updated
Was this helpful?
Change policy state to control execution behavior (enable, disable, pause)
Last updated
Was this helpful?
Was this helpful?
PATCH /api/private/lifecycle_management/policies/{policy_id}
Change the state of a policy to control its execution behavior. Policy states determine whether the policy actively processes events and executes actions. This endpoint provides a quick way to enable, disable, or pause policy execution without modifying the policy configuration.
Use this endpoint to:
Activate draft policies for production use
Temporarily disable policies during maintenance
Pause problematic policies for troubleshooting
Archive obsolete policies without deletion
The main object for controlling the policy it includes descriptions Has multiple versions of it if, one of which is live and up to one of which is in draft mode, all others are historical
The version that is currently live and running
The version that is being edited and in draft form (0 if there is none)
The entity type to use for this policy (derived from the data sources passed in)
The source of identity data source(s) for this policy (must have one and must be of the same type)
List of the access profiles that are
List of the providers used by this policy (derived from the data sources passed in)
If true will only sync if the source of identity changes
If sync_only_when_source_changes is true, how quickly (in minutes) to run a check when no changes are detected (default is 1 day 1440)
Settings that determine when to block changes and send warnings
Provides information about the most recent safety limit warning, cleared when an extraction is fully processed
if true will not retry failed workflows
how many times we will retry a failed workflow (default is 10)
OK
Default error response
PATCH /api/private/lifecycle_management/policies/{value.id} HTTP/1.1
Host: your-tenant.cookiecloud.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 910
{
"name": "text",
"description": "text",
"state": 1,
"datasource_ids": [
"text"
],
"secondary_source_of_identities": [
{
"datasource_ids": [
"text"
],
"correlation_attribute_names": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"only_enrich_existing": true
}
],
"sync_only_when_source_changes": true,
"time_before_sync_if_no_source_changes_in_minutes": 1,
"identity_attribute_mappings": [
{
"identity_attribute": 1,
"entity_attribute_name": "text"
}
],
"safety_limit_settings": {
"enable_change_limit": true,
"enable_predictive_change_limit": true,
"max_identities_affected_percentage": 1,
"max_identities_affected_count": "text",
"warning_email_addresses": [
"text"
]
},
"no_retry_for_failed_workflow": true,
"max_retries_for_failed_workflow": 1,
"event_notification_settings": [
{
"event_type": 1,
"notification_settings": {
"notification_type": 1,
"notification_id": "text",
"type_settings": {
"@type": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
},
"on_success": true,
"on_failure": true
}
]
}
{
"value": {
"id": "text",
"name": "text",
"description": "text",
"state": 1,
"current_version_number": 1,
"draft_version_number": 1,
"entity_type": "text",
"datasource_ids": [
"text"
],
"access_profiles_used": [
"text"
],
"provider_external_ids": [
"text"
],
"current_version": {
"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-26T01:22:58.933Z",
"updated_at": "2025-08-26T01:22:58.933Z",
"published_by": "text",
"published_at": "2025-08-26T01:22:58.933Z"
},
"initial_complete": true,
"secondary_source_of_identities": [
{
"entity_type": "text",
"datasource_ids": [
"text"
],
"provider_external_ids": [
"text"
],
"correlation_attribute_names": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"only_enrich_existing": true
}
],
"sync_only_when_source_changes": true,
"time_before_sync_if_no_source_changes_in_minutes": 1,
"identity_attribute_mappings": [
{
"identity_attribute": 1,
"entity_attribute_name": "text"
}
],
"safety_limit_settings": {
"enable_change_limit": true,
"enable_predictive_change_limit": true,
"max_identities_affected_percentage": 1,
"max_identities_affected_count": "text",
"warning_email_addresses": [
"text"
]
},
"safety_limit_warning": {
"warning_type": 1,
"occurred_at": "2025-08-26T01:22:58.933Z",
"caused_by_extraction_event": {
"id": "text",
"data_source_id": "text",
"provider_id": "text",
"provider_type": "text",
"state": 1,
"provider_external_id": "text",
"agent_type": 1,
"error_message": "text",
"extracted_at": "2025-08-26T01:22:58.933Z",
"policy_id": "text",
"event_type": 1,
"number_of_identities_affected": "text",
"disregard_change_limit": true
},
"identities_changed_count": "text",
"predicted_identities_changed_count": "text"
},
"no_retry_for_failed_workflow": true,
"max_retries_for_failed_workflow": 1,
"event_notification_settings": [
{
"event_type": 1,
"notification_settings": {
"notification_type": 1,
"notification_id": "text",
"type_settings": {
"@type": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
},
"on_success": true,
"on_failure": true
}
],
"created_by": "text",
"created_at": "2025-08-26T01:22:58.933Z",
"updated_at": "2025-08-26T01:22:58.933Z"
}
}
policy_id
string
Yes
Unique identifier of the policy to update
state
string
Yes
New state for the policy: active
, inactive
, draft
reason
string
No
Optional reason for the state change (for audit trail)
curl -X PATCH "https://your-tenant.vezacloud.com/api/private/lifecycle_management/policies/policy-123e4567-e89b-12d3-a456-426614174000" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"state": "active",
"reason": "Policy testing completed, ready for production"
}'
{
"data": {
"id": "policy-123e4567-e89b-12d3-a456-426614174000",
"name": "Onboarding Access Policy",
"description": "Automatically provision access for new employees",
"state": "active",
"previous_state": "draft",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-02-15T14:22:00Z",
"created_by": "[email protected]",
"updated_by": "[email protected]",
"state_change_history": [
{
"from_state": "draft",
"to_state": "active",
"changed_at": "2024-02-15T14:22:00Z",
"changed_by": "[email protected]",
"reason": "Policy testing completed, ready for production"
}
]
}
}
draft
Policy is being developed or tested
Does not execute, can be freely modified
active
Policy is running in production
Actively processes events and executes actions
inactive
Policy is temporarily disabled
Does not execute, but configuration is preserved