> ## Documentation Index
> Fetch the complete documentation index at: https://conductorone-docs-hidden-info-by-role.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Search

> Invokes the c1.api.hooks.v1.HooksSearch.Search method.



## OpenAPI

````yaml https://spec.speakeasy.com/conductor-one/conductorone/my-source-with-code-samples post /api/v1/search/hooks
openapi: 3.1.0
info:
  description: The C1 API is a HTTP API for managing C1 resources.
  title: C1 API
  version: 0.1.0-alpha
servers:
  - description: The C1 API server for the current tenant.
    url: https://{tenantDomain}.conductor.one
    variables:
      tenantDomain:
        default: example
        description: The domain of the tenant to use for this request.
security:
  - bearerAuth: []
    oauth: []
paths:
  /api/v1/search/hooks:
    post:
      tags:
        - Hook
      summary: Search
      description: Invokes the c1.api.hooks.v1.HooksSearch.Search method.
      operationId: c1.api.hooks.v1.HooksSearch.Search
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/c1.api.hooks.v1.HooksSearchRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/c1.api.hooks.v1.HooksSearchResponse'
          description: Successful response
      x-codeSamples:
        - lang: go
          label: Search
          source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/conductorone/conductorone-sdk-go/pkg/models/shared\"\n\tconductoronesdkgo \"github.com/conductorone/conductorone-sdk-go\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := conductoronesdkgo.New(\n        conductoronesdkgo.WithSecurity(shared.Security{\n            BearerAuth: \"<YOUR_BEARER_TOKEN_HERE>\",\n            Oauth: \"<YOUR_OAUTH_HERE>\",\n        }),\n    )\n\n    res, err := s.HooksSearch.Search(ctx, nil)\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.HooksSearchResponse != nil {\n        // handle response\n    }\n}"
        - lang: typescript
          label: Typescript (SDK)
          source: >-
            import { ConductoroneSDKTypescript } from
            "conductorone-sdk-typescript";


            const conductoroneSDKTypescript = new ConductoroneSDKTypescript({
              security: {
                bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
                oauth: "<YOUR_OAUTH_HERE>",
              },
            });


            async function run() {
              const result = await conductoroneSDKTypescript.hooksSearch.search();

              console.log(result);
            }


            run();
components:
  schemas:
    c1.api.hooks.v1.HooksSearchRequest:
      description: The HooksSearchRequest message.
      properties:
        pageSize:
          description: The pageSize field.
          format: int32
          type: integer
        pageToken:
          description: The pageToken field.
          type: string
        query:
          description: The query field.
          type: string
        refs:
          description: The refs field.
          items:
            $ref: '#/components/schemas/c1.api.hooks.v1.HookRef'
          type:
            - array
            - 'null'
      title: Hooks Search Request
      type: object
      x-speakeasy-name-override: HooksSearchRequest
    c1.api.hooks.v1.HooksSearchResponse:
      description: The HooksSearchResponse message.
      properties:
        list:
          description: The list field.
          items:
            $ref: '#/components/schemas/c1.api.hooks.v1.Hook'
          type:
            - array
            - 'null'
        nextPageToken:
          description: The nextPageToken field.
          type: string
      title: Hooks Search Response
      type: object
      x-speakeasy-name-override: HooksSearchResponse
    c1.api.hooks.v1.HookRef:
      description: The HookRef message.
      properties:
        id:
          description: The id field.
          type: string
      title: Hook Ref
      type: object
      x-speakeasy-name-override: HookRef
    c1.api.hooks.v1.Hook:
      description: >
        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
      properties:
        builtinPattern:
          oneOf:
            - $ref: '#/components/schemas/c1.api.hooks.v1.BuiltInPattern'
            - type: 'null'
        createdAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        description:
          description: The description field.
          type: string
        displayName:
          description: The displayName field.
          type: string
        enabled:
          description: The enabled field.
          type: boolean
        event:
          description: The event field.
          enum:
            - HOOK_EVENT_TYPE_UNSPECIFIED
            - HOOK_EVENT_TYPE_PRE_TOOL_USE
            - HOOK_EVENT_TYPE_POST_TOOL_USE
            - HOOK_EVENT_TYPE_PRE_OUTPUT
          type: string
          x-speakeasy-unknown-values: allow
        filter:
          oneOf:
            - $ref: '#/components/schemas/c1.api.hooks.v1.HookFilter'
            - type: 'null'
        function:
          oneOf:
            - $ref: '#/components/schemas/c1.api.hooks.v1.HookFunctionRef'
            - type: 'null'
        id:
          description: The id field.
          type: string
        managedByGuardrails:
          description: >-
            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.
          type: boolean
        priority:
          description: The priority field.
          format: int32
          type: integer
        updatedAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
      title: Hook
      type: object
      x-speakeasy-name-override: Hook
    c1.api.hooks.v1.BuiltInPattern:
      description: >
        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
      properties:
        blockOutput:
          oneOf:
            - $ref: '#/components/schemas/c1.api.hooks.v1.BlockOutputConfig'
            - type: 'null'
        creditCardBlocking:
          oneOf:
            - $ref: '#/components/schemas/c1.api.hooks.v1.CreditCardBlockingConfig'
            - type: 'null'
        encodedContentGuard:
          oneOf:
            - $ref: '#/components/schemas/c1.api.hooks.v1.EncodedContentGuardConfig'
            - type: 'null'
        linkFilter:
          oneOf:
            - $ref: '#/components/schemas/c1.api.hooks.v1.LinkFilterConfig'
            - type: 'null'
        piiRedaction:
          oneOf:
            - $ref: '#/components/schemas/c1.api.hooks.v1.PIIRedactionConfig'
            - type: 'null'
        promptInjectionScan:
          oneOf:
            - $ref: '#/components/schemas/c1.api.hooks.v1.PromptInjectionScanConfig'
            - type: 'null'
        queryScopeLimit:
          oneOf:
            - $ref: '#/components/schemas/c1.api.hooks.v1.QueryScopeLimitConfig'
            - type: 'null'
        secretsMasking:
          oneOf:
            - $ref: '#/components/schemas/c1.api.hooks.v1.SecretsMaskingConfig'
            - type: 'null'
        sensitiveFileGuard:
          oneOf:
            - $ref: '#/components/schemas/c1.api.hooks.v1.SensitiveFileGuardConfig'
            - type: 'null'
        toolOutputSizeGuard:
          oneOf:
            - $ref: '#/components/schemas/c1.api.hooks.v1.ToolOutputSizeGuardConfig'
            - type: 'null'
        writeAuthorization:
          oneOf:
            - $ref: '#/components/schemas/c1.api.hooks.v1.WriteAuthorizationConfig'
            - type: 'null'
      title: Built In Pattern
      type: object
      x-speakeasy-name-override: BuiltInPattern
    c1.api.hooks.v1.HookFilter:
      description: |-
        HookFilter determines which calls (or, for HOOK_EVENT_TYPE_PRE_OUTPUT,
         which outgoing response chunks) a hook applies to.
      properties:
        celExpression:
          description: >-
            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).
             HOOK_EVENT_TYPE_PRE_OUTPUT: ctx.untrusted_class (string), ctx.surface
             (string, "slack" or "web").
          type: string
      title: Hook Filter
      type: object
      x-speakeasy-name-override: HookFilter
    c1.api.hooks.v1.HookFunctionRef:
      description: HookFunctionRef identifies a customer-authored function to invoke.
      properties:
        commitId:
          description: >-
            If empty, the function's published commit is used at invocation
            time.
          type: string
        functionId:
          description: The functionId field.
          type: string
      title: Hook Function Ref
      type: object
      x-speakeasy-name-override: HookFunctionRef
    c1.api.hooks.v1.BlockOutputConfig:
      description: |-
        BlockOutputConfig denies the in-flight response chunk when its hook's
         filter matches. Only valid for HOOK_EVENT_TYPE_PRE_OUTPUT.
      properties:
        message:
          description: |-
            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.
          type: string
        surfaces:
          description: |-
            Output surfaces this hook applies to. Empty means none — the hook is
             inert until at least one surface is explicitly selected.
          items:
            enum:
              - HOOK_OUTPUT_SURFACE_UNSPECIFIED
              - HOOK_OUTPUT_SURFACE_SLACK
              - HOOK_OUTPUT_SURFACE_WEB
            type: string
            x-speakeasy-unknown-values: allow
          type:
            - array
            - 'null'
      title: Block Output Config
      type: object
      x-speakeasy-name-override: BlockOutputConfig
    c1.api.hooks.v1.CreditCardBlockingConfig:
      description: |-
        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.
      title: Credit Card Blocking Config
      type: object
      x-speakeasy-name-override: CreditCardBlockingConfig
    c1.api.hooks.v1.EncodedContentGuardConfig:
      description: >-
        EncodedContentGuardConfig detects encoded/obfuscated smuggling in tool
        input:
         long base64 blobs, long hex runs, and invisible/zero-width unicode.
      properties:
        flagOnly:
          description: >-
            When true, detection records the finding but does not deny
            (observe-only).
          type: boolean
        minBase64Run:
          description: Minimum contiguous base64 run length to flag. <= 0 = default (256).
          format: int32
          type: integer
        minHexRun:
          description: Minimum contiguous hex run length to flag. <= 0 = default (128).
          format: int32
          type: integer
      title: Encoded Content Guard Config
      type: object
      x-speakeasy-name-override: EncodedContentGuardConfig
    c1.api.hooks.v1.LinkFilterConfig:
      description: >-
        LinkFilterConfig strips or annotates URLs and markdown images in tool
        output
         whose host is not in allowed_hosts.
      properties:
        action:
          description: Action taken on a disallowed link. Unspecified = REDACT.
          enum:
            - LINK_FILTER_ACTION_UNSPECIFIED
            - LINK_FILTER_ACTION_REDACT
            - LINK_FILTER_ACTION_ANNOTATE
          type: string
          x-speakeasy-unknown-values: allow
        allowedHosts:
          description: |-
            Hosts that are permitted. Empty = every host is disallowed. Matched
             case-insensitively; a leading "." allows subdomains.
          items:
            type: string
          type:
            - array
            - 'null'
        blockImages:
          description: >-
            When true, markdown image links to disallowed hosts are also acted
            on.
          type: boolean
      title: Link Filter Config
      type: object
      x-speakeasy-name-override: LinkFilterConfig
    c1.api.hooks.v1.PIIRedactionConfig:
      description: >-
        PIIRedactionConfig configures post-tool-use redaction of sensitive
        fields.
      properties:
        redactFields:
          description: The redactFields field.
          items:
            type: string
          type:
            - array
            - 'null'
        replacement:
          description: The replacement field.
          type: string
      title: Pii Redaction Config
      type: object
      x-speakeasy-name-override: PIIRedactionConfig
    c1.api.hooks.v1.PromptInjectionScanConfig:
      description: >-
        PromptInjectionScanConfig scans tool output for prompt-injection using
        the
         aigov A2 judge and acts when the verdict is at or above threshold.
      properties:
        flagOnly:
          description: >-
            When true, a detection records the finding but does not deny
            (observe-only).
          type: boolean
        threshold:
          description: >-
            Deny (or flag) when the judge scores at or above this level.
            Unspecified =
             HIGH.
          enum:
            - PROMPT_INJECTION_THRESHOLD_UNSPECIFIED
            - PROMPT_INJECTION_THRESHOLD_LOW
            - PROMPT_INJECTION_THRESHOLD_MEDIUM
            - PROMPT_INJECTION_THRESHOLD_HIGH
          type: string
          x-speakeasy-unknown-values: allow
      title: Prompt Injection Scan Config
      type: object
      x-speakeasy-name-override: PromptInjectionScanConfig
    c1.api.hooks.v1.QueryScopeLimitConfig:
      description: >-
        QueryScopeLimitConfig caps numeric fields (e.g. limit, page_size) in
        tool
         input so callers cannot request unbounded data.
      properties:
        fields:
          description: The fields field.
          items:
            type: string
          type:
            - array
            - 'null'
        maxLimit:
          description: The maxLimit field.
          format: int32
          type: integer
      title: Query Scope Limit Config
      type: object
      x-speakeasy-name-override: QueryScopeLimitConfig
    c1.api.hooks.v1.SecretsMaskingConfig:
      description: |-
        SecretsMaskingConfig configures post-tool-use redaction of secret-shaped
         substrings (API keys, tokens, private keys) in tool output.
      properties:
        additionalPatterns:
          description: >-
            Extra RE2 regexes whose matches are redacted in addition to the
            built-in
             secret patterns.
          items:
            type: string
          type:
            - array
            - 'null'
        placeholder:
          description: >-
            Replacement string for a matched secret. Empty =
            "***REDACTED-SECRET***".
          type: string
      title: Secrets Masking Config
      type: object
      x-speakeasy-name-override: SecretsMaskingConfig
    c1.api.hooks.v1.SensitiveFileGuardConfig:
      description: |-
        SensitiveFileGuardConfig blocks tool calls that reference sensitive file
         paths or directories.
      properties:
        blockedDirectories:
          description: The blockedDirectories field.
          items:
            type: string
          type:
            - array
            - 'null'
        blockedPatterns:
          description: The blockedPatterns field.
          items:
            type: string
          type:
            - array
            - 'null'
      title: Sensitive File Guard Config
      type: object
      x-speakeasy-name-override: SensitiveFileGuardConfig
    c1.api.hooks.v1.ToolOutputSizeGuardConfig:
      description: ToolOutputSizeGuardConfig caps post-tool-use output size in bytes.
      properties:
        maxBytes:
          description: >-
            Maximum tool output size in bytes. Outputs exceeding this are
            denied.
          format: int32
          type: integer
      title: Tool Output Size Guard Config
      type: object
      x-speakeasy-name-override: ToolOutputSizeGuardConfig
    c1.api.hooks.v1.WriteAuthorizationConfig:
      description: >-
        WriteAuthorizationConfig blocks tool calls whose ToolClassification is
        in
         blocked_classifications, optionally permitting them within business hours.
      properties:
        blockedClassifications:
          description: |-
            Tool classifications to block. Must have at least one entry; a hook
             with no blocked classifications would be a silent misconfiguration.
          items:
            enum:
              - TOOL_CLASSIFICATION_UNSPECIFIED
              - TOOL_CLASSIFICATION_READ
              - TOOL_CLASSIFICATION_WRITE
              - TOOL_CLASSIFICATION_DESTRUCTIVE
              - TOOL_CLASSIFICATION_SENSITIVE
              - TOOL_CLASSIFICATION_DANGEROUS
            type: string
            x-speakeasy-unknown-values: allow
          type:
            - array
            - 'null'
        businessHours:
          oneOf:
            - $ref: '#/components/schemas/c1.api.hooks.v1.BusinessHours'
            - type: 'null'
      title: Write Authorization Config
      type: object
      x-speakeasy-name-override: WriteAuthorizationConfig
    c1.api.hooks.v1.BusinessHours:
      description: BusinessHours defines a weekly time window in a specific timezone.
      properties:
        days:
          description: 0=Sun, 1=Mon, ..., 6=Sat.
          items:
            format: int32
            type: integer
          type:
            - array
            - 'null'
        end:
          description: '"HH:MM" in 24-hour format.'
          type: string
        start:
          description: '"HH:MM" in 24-hour format.'
          type: string
        timezone:
          description: The timezone field.
          type: string
      title: Business Hours
      type: object
      x-speakeasy-name-override: BusinessHours
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http
    oauth:
      description: >-
        This API uses OAuth2 with the Client Credential flow.

        Client Credentials must be sent in the BODY, not the headers.

        For an example of how to implement this, refer to the
        [c1TokenSource.Token()](https://github.com/ConductorOne/conductorone-sdk-go/blob/3375fe7c0126d17e7ec4e711693dee7b791023aa/token_source.go#L101-L187)
        function.
      flows:
        clientCredentials:
          scopes: {}
          tokenUrl: /auth/v1/token
      type: oauth2

````