Validate and activate a hook policy, recording an access-policy revision
Saves only the named endpoint. Other hook and gateway policies are preserved. Changes apply on subsequent hook requests. A stale revision returns 409.
Header Parameters
- SlashID-OrgID string required
The organization ID
Example: af5fbd30-7ce7-4548-8b30-4cd59cb2aba1
- application/json
Request Body required
- endpoint_id string required
- expected_revision int64 required
policy object required
default_effect string requiredPossible values: [
allow,deny]rules object[] required
Possible values:
>= 1,<= 200id string requiredPossible values:
non-emptyeffect string requiredPossible values: [
allow,deny]actions string[] requiredPossible values: [
invoke_model,use_attachment,mcp_call],>= 1models string[]servers string[]methods string[]tools string[]scope_queries object[]
Possible values:
<= 16query string requiredCypher projecting an entity_id column.
metadata object
Authoring-UI state, round-tripped so the builder can re-render the chip.
active_window object
When a rule is in force.
Evaluated against the REQUEST's own time (
input.request.time), not the evaluator's clock, so replaying a recorded request in a dry-run judges it by when it actually happened rather than by when the replay runs.daysis tested against the request's LOCAL day. A range that wraps midnight (from>to) therefore means "beforetoOR afterfrom, on any listed day" — a Friday 22:00-06:00 window is in force Friday 00:00-06:00 and Friday 22:00-24:00, NOT Saturday morning. Say "Friday night into Saturday" with two windows on two rules, or list both days.days string[] requiredPossible values: [
mon,tue,wed,thu,fri,sat,sun],>= 1Days the window applies on, in the window's own timezone.
from string requiredPossible values: Value must match regular expression
^([01][0-9]|2[0-3]):[0-5][0-9]$Inclusive local start, HH:MM.
to string requiredPossible values: Value must match regular expression
^([01][0-9]|2[0-3]):[0-5][0-9]$Exclusive local end, HH:MM. 09:00-17:00 does not include 17:00:00.
Equal to
fromis rejected: it reads as both "always" (a full 24h wrap) and "never" (an empty range), so it has to be said a different way.timezone string requiredIANA name, e.g. "Europe/London". Validated against the tzdata the server carries when the policy is saved. A named zone rather than a fixed offset so the window keeps meaning "office hours" across a daylight-saving transition.
outside_window boolean- note string
Possible values:
<= 2000 characters
- 200
- 400
- 401
- 403
- 404
- 409
The saved endpoint policy.
- application/json
- Schema
- Example (from schema)
Schema
meta object
pagination object
limit integeroffset integertotal_count int64cursor_pagination object
Cursors are opaque. Follow the tokens the server returns; never construct, parse or modify one.
limit integernext_cursor stringOpaque token addressing the next page. Absent on the last page.
prev_cursor stringOpaque token addressing the previous page. Absent on the first page.
last_cursor stringOpaque token addressing the final page directly, so a client can jump to the end without a total count.
total_count int64Total number of matching items. Returned on the FIRST page only; clients cache it for the remainder of the walk.
errors object[]
httpcode integermessage stringcode stringMachine-readable reason, present only for errors that define one. Values today:
unserved_org_region(the organization is homed in a region this deployment does not serve),wrong_region(the request must be sent to the organization's home region),region_route_missing(this instance has no route to the organization's home region).result object
One enforcement point a policy can be attached to.
A
claude_hookorcodex_hookendpoint is declared in deployment configuration and is named by that configuration's id. Apreflightendpoint is virtual: one row per connection whose source supports AI preflight policies, namedconn:<connection-id>so it can never collide with a configured id.A virtual endpoint that has never been saved carries
source: "unset"and apolicyofnull— distinct from a policy with no rules, which cannot exist. Render it as "no policy configured" rather than as an empty rule list, which reads as allow-all.id stringconnection_id stringkind stringPossible values: [
claude_hook,codex_hook,preflight]servers string[]policy object
default_effect stringPossible values: [
allow,deny]rules object[]
Possible values:
>= 1,<= 200id stringPossible values:
non-emptyeffect stringPossible values: [
allow,deny]actions string[]Possible values: [
invoke_model,use_attachment,mcp_call],>= 1models string[]servers string[]methods string[]tools string[]scope_queries object[]
Possible values:
<= 16query stringCypher projecting an entity_id column.
metadata object
Authoring-UI state, round-tripped so the builder can re-render the chip.
active_window object
When a rule is in force.
Evaluated against the REQUEST's own time (
input.request.time), not the evaluator's clock, so replaying a recorded request in a dry-run judges it by when it actually happened rather than by when the replay runs.daysis tested against the request's LOCAL day. A range that wraps midnight (from>to) therefore means "beforetoOR afterfrom, on any listed day" — a Friday 22:00-06:00 window is in force Friday 00:00-06:00 and Friday 22:00-24:00, NOT Saturday morning. Say "Friday night into Saturday" with two windows on two rules, or list both days.days string[]Possible values: [
mon,tue,wed,thu,fri,sat,sun],>= 1Days the window applies on, in the window's own timezone.
from stringPossible values: Value must match regular expression
^([01][0-9]|2[0-3]):[0-5][0-9]$Inclusive local start, HH:MM.
to stringPossible values: Value must match regular expression
^([01][0-9]|2[0-3]):[0-5][0-9]$Exclusive local end, HH:MM. 09:00-17:00 does not include 17:00:00.
Equal to
fromis rejected: it reads as both "always" (a full 24h wrap) and "never" (an empty range), so it has to be said a different way.timezone stringIANA name, e.g. "Europe/London". Validated against the tzdata the server carries when the policy is saved. A named zone rather than a fixed offset so the window keeps meaning "office hours" across a daylight-saving transition.
outside_window booleanrevision int64source stringPossible values: [
deployment,dashboard,unset]
{
"meta": {
"pagination": {
"limit": 0,
"offset": 0,
"total_count": 0
},
"cursor_pagination": {
"limit": 0,
"next_cursor": "string",
"prev_cursor": "string",
"last_cursor": "string",
"total_count": 0
}
},
"errors": [
{
"httpcode": 0,
"message": "string",
"code": "string"
}
],
"result": {
"id": "string",
"connection_id": "string",
"kind": "claude_hook",
"servers": [
"string"
],
"policy": {
"default_effect": "allow",
"rules": [
{
"id": "string",
"effect": "allow",
"actions": [
"invoke_model"
],
"models": [
"string"
],
"servers": [
"string"
],
"methods": [
"string"
],
"tools": [
"string"
],
"scope_queries": [
{
"query": "string",
"metadata": {}
}
],
"active_window": {
"days": [
"mon"
],
"from": "string",
"to": "string",
"timezone": "string"
},
"outside_window": true
}
]
},
"revision": 0,
"source": "deployment"
}
}
Invalid or unsupported policy.
Unauthorized
- application/json
- Schema
- Example (from schema)
Schema
meta object
pagination object
limit integeroffset integertotal_count int64cursor_pagination object
Cursors are opaque. Follow the tokens the server returns; never construct, parse or modify one.
limit integernext_cursor stringOpaque token addressing the next page. Absent on the last page.
prev_cursor stringOpaque token addressing the previous page. Absent on the first page.
last_cursor stringOpaque token addressing the final page directly, so a client can jump to the end without a total count.
total_count int64Total number of matching items. Returned on the FIRST page only; clients cache it for the remainder of the walk.
errors object[]
httpcode integermessage stringcode stringMachine-readable reason, present only for errors that define one. Values today:
unserved_org_region(the organization is homed in a region this deployment does not serve),wrong_region(the request must be sent to the organization's home region),region_route_missing(this instance has no route to the organization's home region).
{
"meta": {
"pagination": {
"limit": 0,
"offset": 0,
"total_count": 0
},
"cursor_pagination": {
"limit": 0,
"next_cursor": "string",
"prev_cursor": "string",
"last_cursor": "string",
"total_count": 0
}
},
"errors": [
{
"httpcode": 0,
"message": "string",
"code": "string"
}
]
}
Forbidden
- application/json
- Schema
- Example (from schema)
Schema
meta object
pagination object
limit integeroffset integertotal_count int64cursor_pagination object
Cursors are opaque. Follow the tokens the server returns; never construct, parse or modify one.
limit integernext_cursor stringOpaque token addressing the next page. Absent on the last page.
prev_cursor stringOpaque token addressing the previous page. Absent on the first page.
last_cursor stringOpaque token addressing the final page directly, so a client can jump to the end without a total count.
total_count int64Total number of matching items. Returned on the FIRST page only; clients cache it for the remainder of the walk.
errors object[]
httpcode integermessage stringcode stringMachine-readable reason, present only for errors that define one. Values today:
unserved_org_region(the organization is homed in a region this deployment does not serve),wrong_region(the request must be sent to the organization's home region),region_route_missing(this instance has no route to the organization's home region).
{
"meta": {
"pagination": {
"limit": 0,
"offset": 0,
"total_count": 0
},
"cursor_pagination": {
"limit": 0,
"next_cursor": "string",
"prev_cursor": "string",
"last_cursor": "string",
"total_count": 0
}
},
"errors": [
{
"httpcode": 0,
"message": "string",
"code": "string"
}
]
}
Not Found
- application/json
- Schema
- Example (from schema)
Schema
meta object
pagination object
limit integeroffset integertotal_count int64cursor_pagination object
Cursors are opaque. Follow the tokens the server returns; never construct, parse or modify one.
limit integernext_cursor stringOpaque token addressing the next page. Absent on the last page.
prev_cursor stringOpaque token addressing the previous page. Absent on the first page.
last_cursor stringOpaque token addressing the final page directly, so a client can jump to the end without a total count.
total_count int64Total number of matching items. Returned on the FIRST page only; clients cache it for the remainder of the walk.
errors object[]
httpcode integermessage stringcode stringMachine-readable reason, present only for errors that define one. Values today:
unserved_org_region(the organization is homed in a region this deployment does not serve),wrong_region(the request must be sent to the organization's home region),region_route_missing(this instance has no route to the organization's home region).
{
"meta": {
"pagination": {
"limit": 0,
"offset": 0,
"total_count": 0
},
"cursor_pagination": {
"limit": 0,
"next_cursor": "string",
"prev_cursor": "string",
"last_cursor": "string",
"total_count": 0
}
},
"errors": [
{
"httpcode": 0,
"message": "string",
"code": "string"
}
]
}
Policy changed since it was loaded. Reload before saving.