Skip to main content

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
Request Body required
  • endpoint_id string required
  • expected_revision int64 required
  • policy object required
  • default_effect string required

    Possible values: [allow, deny]

  • rules object[] required

    Possible values: >= 1, <= 200

  • id string required

    Possible values: non-empty

  • effect string required

    Possible values: [allow, deny]

  • actions string[] required

    Possible values: [invoke_model, use_attachment, mcp_call], >= 1

  • models string[]
  • servers string[]
  • methods string[]
  • tools string[]
  • scope_queries object[]

    Possible values: <= 16

  • query string required

    Cypher 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.

    days is tested against the request's LOCAL day. A range that wraps midnight (from > to) therefore means "before to OR after from, 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[] required

    Possible values: [mon, tue, wed, thu, fri, sat, sun], >= 1

    Days the window applies on, in the window's own timezone.

  • from string required

    Possible values: Value must match regular expression ^([01][0-9]|2[0-3]):[0-5][0-9]$

    Inclusive local start, HH:MM.

  • to string required

    Possible 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 from is 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 required

    IANA 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

Responses

The saved endpoint policy.


Schema
  • meta object
  • pagination object
  • limit integer
  • offset integer
  • total_count int64
  • cursor_pagination object

    Cursors are opaque. Follow the tokens the server returns; never construct, parse or modify one.

  • limit integer
  • next_cursor string

    Opaque token addressing the next page. Absent on the last page.

  • prev_cursor string

    Opaque token addressing the previous page. Absent on the first page.

  • last_cursor string

    Opaque token addressing the final page directly, so a client can jump to the end without a total count.

  • total_count int64

    Total number of matching items. Returned on the FIRST page only; clients cache it for the remainder of the walk.

  • errors object[]
  • httpcode integer
  • message string
  • code string

    Machine-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_hook or codex_hook endpoint is declared in deployment configuration and is named by that configuration's id. A preflight endpoint is virtual: one row per connection whose source supports AI preflight policies, named conn:<connection-id> so it can never collide with a configured id.

    A virtual endpoint that has never been saved carries source: "unset" and a policy of null — 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 string
  • connection_id string
  • kind string

    Possible values: [claude_hook, codex_hook, preflight]

  • servers string[]
  • policy object
  • default_effect string

    Possible values: [allow, deny]

  • rules object[]

    Possible values: >= 1, <= 200

  • id string

    Possible values: non-empty

  • effect string

    Possible values: [allow, deny]

  • actions string[]

    Possible values: [invoke_model, use_attachment, mcp_call], >= 1

  • models string[]
  • servers string[]
  • methods string[]
  • tools string[]
  • scope_queries object[]

    Possible values: <= 16

  • query string

    Cypher 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.

    days is tested against the request's LOCAL day. A range that wraps midnight (from > to) therefore means "before to OR after from, 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], >= 1

    Days the window applies on, in the window's own timezone.

  • from string

    Possible values: Value must match regular expression ^([01][0-9]|2[0-3]):[0-5][0-9]$

    Inclusive local start, HH:MM.

  • to string

    Possible 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 from is 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

    IANA 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
  • revision int64
  • source string

    Possible values: [deployment, dashboard, unset]