---
title: "Get"
method: GET
path: "/api/v1/hooks/{id}"
tags: ["Hook"]
---

# Get

`GET /api/v1/hooks/{id}`

Invokes the c1.api.hooks.v1.HooksService.Get method.

## Path parameters

- `id` string, required — The id field.

## Response `200`

Successful response

- C1ApiHooksV1HooksServiceGetResponse — The HooksServiceGetResponse message.
  - `hook` C1ApiHooksV1Hook — Hook represents a customer-configured interception point for tool calls. This message contains a oneof named hook_type. Only a single field of the following list may be set at a time: - function - builtinPattern - jsonPatch
    - `builtinPattern` C1ApiHooksV1BuiltInPattern — BuiltInPattern references a ConductorOne-maintained DLP pattern. The specific pattern and its configuration are encoded as a oneof. This message contains a oneof named config. Only a single field of the following list may be set at a time: - piiRedaction - creditCardBlocking - queryScopeLimit - writeAuthorization - sensitiveFileGuard - toolOutputSizeGuard - secretsMasking - linkFilter - encodedContentGuard - promptInjectionScan - blockOutput - blockToolCall - preToolBlock
      - `blockOutput` C1ApiHooksV1BlockOutputConfig — BlockOutputConfig denies the in-flight response chunk when its hook's filter matches. Only valid for HOOK_EVENT_TYPE_PRE_OUTPUT.
        - `message` string — Message shown to the user when this hook blocks the response. Empty falls back to the curating AgentGuardrailRule's deny_reason, then to a generic default.
        - `surfaces` string[], nullable — Output surfaces this hook applies to. Empty means none — the hook is inert until at least one surface is explicitly selected.
      - `blockToolCall` C1ApiHooksV1BlockToolCallConfig — BlockToolCallConfig unconditionally denies the tool call when its hook's filter matches. Only valid for HOOK_EVENT_TYPE_POST_TOOL_USE.
        - `message` string — Message shown when the tool call is denied. Empty falls back to a generic default.
      - `creditCardBlocking` C1ApiHooksV1CreditCardBlockingConfig — CreditCardBlockingConfig denies any tool call whose output contains a Luhn-valid credit card number. No configuration fields today; the presence of the oneof arm is the whole configuration.
      - `encodedContentGuard` C1ApiHooksV1EncodedContentGuardConfig — EncodedContentGuardConfig detects encoded/obfuscated smuggling in tool input: long base64 blobs, long hex runs, and invisible/zero-width unicode.
        - `flagOnly` boolean — When true, detection records the finding but does not deny (observe-only).
        - `minBase64Run` integer — Minimum contiguous base64 run length to flag. <= 0 = default (256).
        - `minHexRun` integer — Minimum contiguous hex run length to flag. <= 0 = default (128).
      - `linkFilter` C1ApiHooksV1LinkFilterConfig — LinkFilterConfig strips or annotates URLs and markdown images in tool output whose host is not in allowed_hosts.
        - `action` 'LINK_FILTER_ACTION_UNSPECIFIED' | 'LINK_FILTER_ACTION_REDACT' | 'LINK_FILTER_ACTION_ANNOTATE' — Action taken on a disallowed link. Unspecified = REDACT.
        - `allowedHosts` string[], nullable — Hosts that are permitted. Empty = every host is disallowed. Matched case-insensitively; a leading "." allows subdomains.
        - `blockImages` boolean — When true, markdown image links to disallowed hosts are also acted on.
      - `piiRedaction` C1ApiHooksV1PIIRedactionConfig — PIIRedactionConfig configures post-tool-use redaction of sensitive fields.
        - `redactFields` string[], nullable — The redactFields field.
        - `replacement` string — The replacement field.
      - `preToolBlock` C1ApiHooksV1PreToolBlockConfig — PreToolBlockConfig unconditionally denies the tool call before it executes when its hook's filter matches. Only valid for HOOK_EVENT_TYPE_PRE_TOOL_USE.
        - `message` string — Message shown when the tool call is denied. Empty falls back to a generic default.
      - `promptInjectionScan` C1ApiHooksV1PromptInjectionScanConfig — PromptInjectionScanConfig scans tool output for prompt-injection using the aigov A2 judge and acts when the verdict is at or above threshold.
        - `flagOnly` boolean — When true, a detection records the finding but does not deny (observe-only).
        - `threshold` 'PROMPT_INJECTION_THRESHOLD_UNSPECIFIED' | 'PROMPT_INJECTION_THRESHOLD_LOW' | 'PROMPT_INJECTION_THRESHOLD_MEDIUM' | 'PROMPT_INJECTION_THRESHOLD_HIGH' — Deny (or flag) when the judge scores at or above this level. Unspecified = HIGH.
      - `queryScopeLimit` C1ApiHooksV1QueryScopeLimitConfig — QueryScopeLimitConfig caps numeric fields (e.g. limit, page_size) in tool input so callers cannot request unbounded data.
        - `fields` string[], nullable — The fields field.
        - `maxLimit` integer — The maxLimit field.
      - `secretsMasking` C1ApiHooksV1SecretsMaskingConfig — SecretsMaskingConfig configures post-tool-use redaction of secret-shaped substrings (API keys, tokens, private keys) in tool output.
        - `additionalPatterns` string[], nullable — Extra RE2 regexes whose matches are redacted in addition to the built-in secret patterns.
        - `placeholder` string — Replacement string for a matched secret. Empty = "***REDACTED-SECRET***".
      - `sensitiveFileGuard` C1ApiHooksV1SensitiveFileGuardConfig — SensitiveFileGuardConfig blocks tool calls that reference sensitive file paths or directories.
        - `blockedDirectories` string[], nullable — The blockedDirectories field.
        - `blockedPatterns` string[], nullable — The blockedPatterns field.
      - `toolOutputSizeGuard` C1ApiHooksV1ToolOutputSizeGuardConfig — ToolOutputSizeGuardConfig caps post-tool-use output size in bytes.
        - `maxBytes` integer — Maximum tool output size in bytes. Outputs exceeding this are denied.
      - `writeAuthorization` C1ApiHooksV1WriteAuthorizationConfig — WriteAuthorizationConfig blocks tool calls whose ToolClassification is in blocked_classifications, optionally permitting them within business hours.
        - `blockedClassifications` string[], nullable — Tool classifications to block. Must have at least one entry; a hook with no blocked classifications would be a silent misconfiguration.
        - `businessHours` C1ApiHooksV1BusinessHours — BusinessHours defines a weekly time window in a specific timezone.
          - `days` integer[], nullable — 0=Sun, 1=Mon, ..., 6=Sat.
          - `end` string — "HH:MM" in 24-hour format.
          - `start` string — "HH:MM" in 24-hour format.
          - `timezone` string — The timezone field.
    - `createdAt` string, date-time, nullable
    - `description` string — The description field.
    - `displayName` string — The displayName field.
    - `enabled` boolean — The enabled field.
    - `event` 'HOOK_EVENT_TYPE_UNSPECIFIED' | 'HOOK_EVENT_TYPE_PRE_TOOL_USE' | 'HOOK_EVENT_TYPE_POST_TOOL_USE' | 'HOOK_EVENT_TYPE_PRE_OUTPUT' — The event field.
    - `filter` C1ApiHooksV1HookFilter — HookFilter determines which calls (or, for HOOK_EVENT_TYPE_PRE_OUTPUT, which outgoing response chunks) a hook applies to.
      - `celExpression` string — CEL expression evaluated against event context. Must evaluate to bool, empty = matches everything for the event type. HOOK_EVENT_TYPE_PRE_TOOL_USE / POST_TOOL_USE: ctx.tool_name (string), and for a call originating from a chat channel ctx.surface (string, "slack", "web", or "teams"), ctx.channel_id (string, the channel the message arrived on — only set for "slack"/"teams"; "web" channel refs are per-conversation and not admin-predictable), and ctx.workspace_id (string, the Slack/Teams workspace, when known). All three are absent otherwise, so guard them with has(ctx.surface) / has(ctx.channel_id) / has(ctx.workspace_id). HOOK_EVENT_TYPE_PRE_OUTPUT: ctx.untrusted_class (string), ctx.surface (string, "slack" or "web").
    - `function` C1ApiHooksV1HookFunctionRef — HookFunctionRef identifies a customer-authored function to invoke.
      - `commitId` string — If empty, the function's published commit is used at invocation time.
      - `functionId` string — The functionId field.
    - `id` string — The id field.
    - `jsonPatch` C1ApiHooksV1JSONPatchConfig — JSONPatchConfig adds, overwrites, or removes fields on a tool call's JSON input, with no function invocation. Only valid on HOOK_EVENT_TYPE_PRE_TOOL_USE. cel_expression is evaluated against ctx/input/caller and must produce a map; static_overlay is a fixed map. Either result is shallow-merged onto the input under RFC 7396 merge patch semantics: a key overwrites or adds that key, a null value removes it, and a nested object replaces rather than merging into the existing one. This message contains a oneof named source. Only a single field of the following list may be set at a time: - celExpression - staticOverlay
      - `celExpression` string, nullable — The celExpression field. This field is part of the `source` oneof. See the documentation for `c1.api.hooks.v1.JSONPatchConfig` for more details.
      - `staticOverlay` object, nullable
    - `managedByGuardrails` boolean — managed_by_guardrails marks a hook as selectable in a guardrail rule's curated pre_hook_ids/post_hook_ids. A hook left false (the default, including every pre-existing hook) always runs regardless of guardrail state; a hook set true only runs when a matched rule selects it.
    - `priority` integer — The priority field.
    - `updatedAt` string, date-time, nullable

---

[API](https://skmtc.net/conductorone/apis/c1-api.md) · [All operations](https://skmtc.net/conductorone/apis/c1-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/conductorone/c1-api/revisions/f2cf3228f366/schema)
