curl -X POST "https://api-production-56df.up.railway.app/policies/cust_8f2e4a91-bb3c-4d17-a1e0-6c9f3d5b7e82" \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key" \
-d '{
"sensitive_fields": [
"ssn",
"credit_card",
"api_key",
"password",
"date_of_birth",
"bank_account"
],
"allowed_tools": [
"read_file",
"search_code",
"create_pull_request",
"list_issues",
"send_message"
],
"blocked_actions": [
"database:table:drop",
"filesystem:file:delete",
"cloud:iam:modify",
"cloud:secrets:read"
],
"custom_rules": {
"max_sensitivity_for_batch": {
"condition": "batch_size > 100 AND target.sensitivity_level >= 3",
"score_impact": 30,
"description": "Flag large batch operations on sensitive resources"
},
"after_hours_penalty": {
"condition": "hour(timestamp) < 6 OR hour(timestamp) > 22",
"score_impact": 15,
"description": "Elevate risk for actions outside business hours"
}
},
"allowed_action_patterns": [
"github:pull_request:*",
"slack:message:send",
"jira:issue:*"
],
"blocked_action_patterns": [
"*:*:delete",
"cloud:iam:*",
"database:schema:*"
],
"sensitive_classifications": [
"PII",
"PHI",
"financial",
"secret",
"restricted"
]
}'
{
"customer_id": "cust_8f2e4a91-bb3c-4d17-a1e0-6c9f3d5b7e82",
"policies": {
"sensitive_fields": ["ssn", "credit_card", "api_key", "password", "date_of_birth", "bank_account"],
"allowed_tools": ["read_file", "search_code", "create_pull_request", "list_issues", "send_message"],
"blocked_actions": ["database:table:drop", "filesystem:file:delete", "cloud:iam:modify", "cloud:secrets:read"],
"custom_rules": {
"max_sensitivity_for_batch": {
"condition": "batch_size > 100 AND target.sensitivity_level >= 3",
"score_impact": 30,
"description": "Flag large batch operations on sensitive resources"
},
"after_hours_penalty": {
"condition": "hour(timestamp) < 6 OR hour(timestamp) > 22",
"score_impact": 15,
"description": "Elevate risk for actions outside business hours"
}
},
"allowed_action_patterns": ["github:pull_request:*", "slack:message:send", "jira:issue:*"],
"blocked_action_patterns": ["*:*:delete", "cloud:iam:*", "database:schema:*"],
"sensitive_classifications": ["PII", "PHI", "financial", "secret", "restricted"]
},
"updated_at": "2026-02-26T15:00:00Z"
}
Create a new policy configuration for a customer. Policies define sensitive fields, allowed/blocked actions, and custom scoring rules that affect how events are evaluated.
curl -X POST "https://api-production-56df.up.railway.app/policies/cust_8f2e4a91-bb3c-4d17-a1e0-6c9f3d5b7e82" \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key" \
-d '{
"sensitive_fields": [
"ssn",
"credit_card",
"api_key",
"password",
"date_of_birth",
"bank_account"
],
"allowed_tools": [
"read_file",
"search_code",
"create_pull_request",
"list_issues",
"send_message"
],
"blocked_actions": [
"database:table:drop",
"filesystem:file:delete",
"cloud:iam:modify",
"cloud:secrets:read"
],
"custom_rules": {
"max_sensitivity_for_batch": {
"condition": "batch_size > 100 AND target.sensitivity_level >= 3",
"score_impact": 30,
"description": "Flag large batch operations on sensitive resources"
},
"after_hours_penalty": {
"condition": "hour(timestamp) < 6 OR hour(timestamp) > 22",
"score_impact": 15,
"description": "Elevate risk for actions outside business hours"
}
},
"allowed_action_patterns": [
"github:pull_request:*",
"slack:message:send",
"jira:issue:*"
],
"blocked_action_patterns": [
"*:*:delete",
"cloud:iam:*",
"database:schema:*"
],
"sensitive_classifications": [
"PII",
"PHI",
"financial",
"secret",
"restricted"
]
}'
{
"customer_id": "cust_8f2e4a91-bb3c-4d17-a1e0-6c9f3d5b7e82",
"policies": {
"sensitive_fields": ["ssn", "credit_card", "api_key", "password", "date_of_birth", "bank_account"],
"allowed_tools": ["read_file", "search_code", "create_pull_request", "list_issues", "send_message"],
"blocked_actions": ["database:table:drop", "filesystem:file:delete", "cloud:iam:modify", "cloud:secrets:read"],
"custom_rules": {
"max_sensitivity_for_batch": {
"condition": "batch_size > 100 AND target.sensitivity_level >= 3",
"score_impact": 30,
"description": "Flag large batch operations on sensitive resources"
},
"after_hours_penalty": {
"condition": "hour(timestamp) < 6 OR hour(timestamp) > 22",
"score_impact": 15,
"description": "Elevate risk for actions outside business hours"
}
},
"allowed_action_patterns": ["github:pull_request:*", "slack:message:send", "jira:issue:*"],
"blocked_action_patterns": ["*:*:delete", "cloud:iam:*", "database:schema:*"],
"sensitive_classifications": ["PII", "PHI", "financial", "secret", "restricted"]
},
"updated_at": "2026-02-26T15:00:00Z"
}
X-API-Key header for authentication.["ssn", "credit_card", "api_key", "password", "date_of_birth"]
["read_file", "search_code", "create_pull_request"]
domain:scope:verb action strings that are explicitly prohibited.["database:table:drop", "filesystem:file:delete", "cloud:iam:modify"]
Show custom rule example
{
"max_sensitivity_for_batch": {
"condition": "batch_size > 100 AND target.sensitivity_level >= 3",
"score_impact": 30,
"description": "Flag large batch operations on sensitive resources"
}
}
["github:pull_request:*", "slack:message:send", "jira:issue:*"]
["*:*:delete", "cloud:iam:*", "database:schema:*"]
["PII", "PHI", "financial", "secret", "restricted"]
Show policies properties
curl -X POST "https://api-production-56df.up.railway.app/policies/cust_8f2e4a91-bb3c-4d17-a1e0-6c9f3d5b7e82" \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key" \
-d '{
"sensitive_fields": [
"ssn",
"credit_card",
"api_key",
"password",
"date_of_birth",
"bank_account"
],
"allowed_tools": [
"read_file",
"search_code",
"create_pull_request",
"list_issues",
"send_message"
],
"blocked_actions": [
"database:table:drop",
"filesystem:file:delete",
"cloud:iam:modify",
"cloud:secrets:read"
],
"custom_rules": {
"max_sensitivity_for_batch": {
"condition": "batch_size > 100 AND target.sensitivity_level >= 3",
"score_impact": 30,
"description": "Flag large batch operations on sensitive resources"
},
"after_hours_penalty": {
"condition": "hour(timestamp) < 6 OR hour(timestamp) > 22",
"score_impact": 15,
"description": "Elevate risk for actions outside business hours"
}
},
"allowed_action_patterns": [
"github:pull_request:*",
"slack:message:send",
"jira:issue:*"
],
"blocked_action_patterns": [
"*:*:delete",
"cloud:iam:*",
"database:schema:*"
],
"sensitive_classifications": [
"PII",
"PHI",
"financial",
"secret",
"restricted"
]
}'
{
"customer_id": "cust_8f2e4a91-bb3c-4d17-a1e0-6c9f3d5b7e82",
"policies": {
"sensitive_fields": ["ssn", "credit_card", "api_key", "password", "date_of_birth", "bank_account"],
"allowed_tools": ["read_file", "search_code", "create_pull_request", "list_issues", "send_message"],
"blocked_actions": ["database:table:drop", "filesystem:file:delete", "cloud:iam:modify", "cloud:secrets:read"],
"custom_rules": {
"max_sensitivity_for_batch": {
"condition": "batch_size > 100 AND target.sensitivity_level >= 3",
"score_impact": 30,
"description": "Flag large batch operations on sensitive resources"
},
"after_hours_penalty": {
"condition": "hour(timestamp) < 6 OR hour(timestamp) > 22",
"score_impact": 15,
"description": "Elevate risk for actions outside business hours"
}
},
"allowed_action_patterns": ["github:pull_request:*", "slack:message:send", "jira:issue:*"],
"blocked_action_patterns": ["*:*:delete", "cloud:iam:*", "database:schema:*"],
"sensitive_classifications": ["PII", "PHI", "financial", "secret", "restricted"]
},
"updated_at": "2026-02-26T15:00:00Z"
}