Referencia de endpointsPolíticas
Crear una política
POST
bearerAuthheader
AutorizaciónBearer <token>Token de API creado en Ajustes → API. Los alcances están vinculados al token; cada operación indica el alcance requerido en x-scope.
org_id?stringSolo socios (orgs:manage): actúa sobre esta organización hija. También se puede enviar como org_id en cuerpos JSON.
Formato
uuidIdempotency-Key?stringReproduce la respuesta original durante 24 h
Longitud
1 <= length <= 255application/json- body
name*stringLongitud
2 <= length <= 120description?stringLongitud
length <= 1000store_id?stringOmit for an organization-level policy
Formato
uuidmode?stringPredeterminado
"recommend"Valor en
"recommend""auto"priority?integerRango
1 <= value <= 10000Predeterminado
100match?conditions?action*stringValor en
"authorize""needs_review""block"justification_template?stringLongitud
length <= 1000expires_days?|Rango
1 <= value <= 3650active?booleanPredeterminado
truePolítica
application/json- response
id?stringFormato
uuidorg_id?stringFormato
uuidstore_id?|Formato
uuidname?stringdescription?string|nullversion?integeractive?booleanmode?stringValor en
"recommend""auto"priority?integerLower = evaluated first; first match decides
match?conditions?action?stringValor en
"authorize""needs_review""block"justification_template?|Supports {domain} {vendor} {path}
expires_days?integer|nullis_default?booleancreated_at?stringFormato
date-timeupdated_at?stringFormato
date-timecurl -X POST "https://example.com/policies" \ -H "Content-Type: application/json" \ -d '{ "name": "Analytics approved by marketing", "match": { "origin": "known_vendor", "category": [ "analytics" ] }, "conditions": { "no_sensitive_field_access": true, "not_in_threat_list": true }, "action": "authorize", "mode": "recommend", "priority": 60, "justification_template": "{vendor} analytics ({domain}) — no access to payment fields in the last 30 days.", "expires_days": 90 }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b", "store_id": "7fe87115-950c-4ae8-bd7e-970406bc9ac0", "name": "string", "description": "string", "version": 0, "active": true, "mode": "recommend", "priority": 0, "match": { "origin": "first_party", "domain": [ "string" ], "path_glob": [ "string" ], "category": [ "string" ], "vendor_id": [ "string" ] }, "conditions": { "same_origin": true, "prevalence_min": 0, "no_sensitive_field_access": true, "not_in_threat_list": true, "in_threat_list": true, "store_provider": true, "max_size_kb": 0, "has_integrity_attr": true }, "action": "authorize", "justification_template": "string", "expires_days": 0, "is_default": true, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}