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

# Update

> Invokes the c1.api.hooks.v1.HooksService.Update method.



## OpenAPI

````yaml https://spec.speakeasy.com/conductor-one/conductorone/my-source-with-code-samples post /api/v1/hooks/{id}
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/hooks/{id}:
    post:
      tags:
        - Hook
      summary: Update
      description: Invokes the c1.api.hooks.v1.HooksService.Update method.
      operationId: c1.api.hooks.v1.HooksService.Update
      parameters:
        - in: path
          name: id
          required: true
          schema:
            description: The id field.
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/c1.api.hooks.v1.HooksServiceUpdateRequestInput
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/c1.api.hooks.v1.HooksServiceUpdateResponse
          description: Successful response
      x-codeSamples:
        - lang: go
          label: Update
          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\"github.com/conductorone/conductorone-sdk-go/pkg/models/operations\"\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.Hooks.Update(ctx, operations.C1APIHooksV1HooksServiceUpdateRequest{\n        ID: \"<id>\",\n    })\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.HooksServiceUpdateResponse != 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.hooks.update({
                id: "<id>",
              });

              console.log(result);
            }


            run();
components:
  schemas:
    c1.api.hooks.v1.HooksServiceUpdateRequestInput:
      description: The HooksServiceUpdateRequest message.
      properties:
        hook:
          oneOf:
            - $ref: '#/components/schemas/c1.api.hooks.v1.Hook'
            - type: 'null'
        updateMask:
          type:
            - string
            - 'null'
      title: Hooks Service Update Request
      type: object
      x-speakeasy-name-override: HooksServiceUpdateRequest
    c1.api.hooks.v1.HooksServiceUpdateResponse:
      description: The HooksServiceUpdateResponse message.
      properties:
        hook:
          oneOf:
            - $ref: '#/components/schemas/c1.api.hooks.v1.Hook'
            - type: 'null'
      title: Hooks Service Update Response
      type: object
      x-speakeasy-name-override: HooksServiceUpdateResponse
    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
            - 'null'
        displayName:
          description: The displayName field.
          type:
            - string
            - 'null'
        enabled:
          description: The enabled field.
          type:
            - boolean
            - 'null'
        event:
          description: The event field.
          enum:
            - HOOK_EVENT_TYPE_UNSPECIFIED
            - HOOK_EVENT_TYPE_PRE_TOOL_USE
            - HOOK_EVENT_TYPE_POST_TOOL_USE
          type:
            - string
            - 'null'
          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
            - 'null'
        priority:
          description: The priority field.
          format: int32
          type:
            - integer
            - 'null'
        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
      properties:
        creditCardBlocking:
          oneOf:
            - $ref: '#/components/schemas/c1.api.hooks.v1.CreditCardBlockingConfig'
            - type: 'null'
        piiRedaction:
          oneOf:
            - $ref: '#/components/schemas/c1.api.hooks.v1.PIIRedactionConfig'
            - type: 'null'
        queryScopeLimit:
          oneOf:
            - $ref: '#/components/schemas/c1.api.hooks.v1.QueryScopeLimitConfig'
            - type: 'null'
        sensitiveFileGuard:
          oneOf:
            - $ref: '#/components/schemas/c1.api.hooks.v1.SensitiveFileGuardConfig'
            - 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 tool calls a hook applies to.
      properties:
        celExpression:
          description: |-
            CEL expression evaluated against tool call context.
             Available variable: ctx.tool_name (string).
             Must evaluate to bool. Empty matches all tools.
          type:
            - string
            - 'null'
      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
            - 'null'
        functionId:
          description: The functionId field.
          type:
            - string
            - 'null'
      title: Hook Function Ref
      type: object
      x-speakeasy-name-override: HookFunctionRef
    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.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
            - 'null'
      title: Pii Redaction Config
      type: object
      x-speakeasy-name-override: PIIRedactionConfig
    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
            - 'null'
      title: Query Scope Limit Config
      type: object
      x-speakeasy-name-override: QueryScopeLimitConfig
    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.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
            - 'null'
        start:
          description: '"HH:MM" in 24-hour format.'
          type:
            - string
            - 'null'
        timezone:
          description: The timezone field.
          type:
            - string
            - 'null'
      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

````