Skip to content

Update project policy

PUT
/api/v2026-01/projects/{projectId}/policy
curl --request PUT \
--url 'https://api.zstrike.io/api/v2026-01/projects/example/policy?policyId=example' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-op-id: example' \
--header 'x-session-id: example' \
--data '{ "description": "example", "policy": "example", "status": "ACTIVE", "sessionConditions": [ { "kind": "policy", "policyId": "example", "decisionBucket": "allow", "operator": "lt", "count": 1 } ], "sessionConditionMergeOperator": "and", "verifyDescription": false }'
projectId
required
string

Project ID

policyId
required
string

Policy ID

x-op-id
required
string

Operation ID

x-session-id
required
string

Session ID

Media typeapplication/json
object
description
required
string
policy
required
string
status
required
string
Allowed values: ACTIVE INACTIVE DELETED
sessionConditions

Optional metadata for managed session-condition policies. PDP enforces the Cedar policy; PAP stores this for UI round-trip.

Array<object>
object
kind
required
string
Allowed values: policy
policyId
required

Policy ID whose audit decisions are counted in a session.

string
decisionBucket
required
string
Allowed values: allow deny
operator
required
string
Allowed values: lt lte gt gte eq
count
required
integer
>= 1 <= 99
sessionConditionMergeOperator

Merge operator for multiple session conditions.

string
Allowed values: and or
verifyDescription

When true, uses AI to verify the description matches the policy before saving.

boolean

Success

Media typeapplication/json
object
code
string
description
string
success
boolean
data
object
timestamp
string format: date-time

Example

{
"code": "S200",
"description": "Operation Successful",
"success": true,
"data": {
"key": "value"
}
}

Bad Request

Media typeapplication/json
object
code
string
description
string
success
boolean
errors
Array<string>
op_id
string
timestamp
string format: date-time

Example

{
"code": "E400",
"description": "Bad Request",
"success": false,
"errors": [
"Error Message 1",
"Error Message 2"
],
"op_id": "op_example"
}

Unauthorized

Media typeapplication/json
object
code
string
description
string
success
boolean
errors
Array<string>
op_id
string
timestamp
string format: date-time

Example

{
"code": "E401",
"description": "Unauthorized",
"success": false,
"errors": [
"Unauthorized"
],
"op_id": "op_example"
}

Forbidden

Media typeapplication/json
object
code
string
description
string
success
boolean
errors
Array<string>
op_id
string
timestamp
string format: date-time

Example

{
"code": "E403",
"description": "Forbidden",
"success": false,
"errors": [
"Forbidden"
],
"op_id": "op_example"
}

Not Found

Media typeapplication/json
object
code
string
description
string
success
boolean
errors
Array<string>
op_id
string
timestamp
string format: date-time

Example

{
"code": "E404",
"description": "Not Found",
"success": false,
"errors": [
"Not Found"
],
"op_id": "op_example"
}

Internal Server Error

Media typeapplication/json
object
code
string
description
string
success
boolean
errors
Array<string>
op_id
string
timestamp
string format: date-time

Example

{
"code": "E500",
"description": "Internal Server Error",
"success": false,
"errors": [
"Internal Server Error"
]
}