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

# Get Classifier Template

> Get returns a classifier template revision. An empty template_version
 selects the latest revision.



## OpenAPI

````yaml https://spec.speakeasy.com/conductor-one/conductorone/my-source-with-code-samples get /api/v1/classifier_templates/{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/classifier_templates/{id}:
    get:
      tags:
        - Classifier Templates
      summary: Get Classifier Template
      description: |-
        Get returns a classifier template revision. An empty template_version
         selects the latest revision.
      operationId: c1.api.ai_governance.v1.ClassifierTemplateService.GetClassifierTemplate
      parameters:
        - in: path
          name: id
          required: true
          schema:
            description: The id field.
            type: string
        - in: query
          name: template_version
          schema:
            description: Optional; empty resolves the latest version.
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/c1.api.ai_governance.v1.GetClassifierTemplateResponse
          description: Successful response
components:
  schemas:
    c1.api.ai_governance.v1.GetClassifierTemplateResponse:
      description: The GetClassifierTemplateResponse message.
      properties:
        template:
          oneOf:
            - $ref: '#/components/schemas/c1.api.ai_governance.v1.ClassifierTemplate'
            - type: 'null'
      title: Get Classifier Template Response
      type: object
      x-speakeasy-name-override: GetClassifierTemplateResponse
    c1.api.ai_governance.v1.ClassifierTemplate:
      description: |-
        ClassifierTemplate is a versioned, parameterizable definition that
         instantiates a live Classifier.
      properties:
        applicableType:
          description: The applicableType field.
          enum:
            - CLASSIFIER_TYPE_UNSPECIFIED
            - CLASSIFIER_TYPE_AGENT
            - CLASSIFIER_TYPE_GATEWAY
          type: string
          x-speakeasy-unknown-values: allow
        createdAt:
          format: date-time
          type:
            - string
            - 'null'
        defaultDenyReason:
          description: The defaultDenyReason field.
          type: string
        defaultOutcome:
          description: The defaultOutcome field.
          enum:
            - AGENT_CLASSIFIER_RULE_OUTCOME_UNSPECIFIED
            - AGENT_CLASSIFIER_RULE_OUTCOME_ALLOWED
            - AGENT_CLASSIFIER_RULE_OUTCOME_DENIED
          type: string
          x-speakeasy-unknown-values: allow
        deletedAt:
          format: date-time
          type:
            - string
            - 'null'
        description:
          description: The description field.
          type: string
        displayName:
          description: The displayName field.
          type: string
        distribution:
          description: The distribution field.
          enum:
            - TEMPLATE_DISTRIBUTION_UNSPECIFIED
            - TEMPLATE_DISTRIBUTION_COPY
            - TEMPLATE_DISTRIBUTION_LINKED
          type: string
          x-speakeasy-unknown-values: allow
        frameworkTags:
          description: |-
            Compliance-framework identifiers this template maps to (e.g.
             "owasp-llm-top-10"). Plain strings for customer extensibility, not an enum.
          items:
            type: string
          type:
            - array
            - 'null'
        hooks:
          description: The hooks field.
          items:
            $ref: '#/components/schemas/c1.api.ai_governance.v1.HookSpec'
          type:
            - array
            - 'null'
        id:
          description: The id field.
          type: string
        isLatest:
          description: The isLatest field.
          type: boolean
        managedBy:
          description: The managedBy field.
          enum:
            - MANAGED_BY_UNSPECIFIED
            - MANAGED_BY_TENANT
            - MANAGED_BY_SYSTEM
          type: string
          x-speakeasy-unknown-values: allow
        presetTier:
          description: >-
            Non-UNSPECIFIED only on the three system presets
            (Shadow/Balanced/Strict);
             identifies and strictness-orders them for the default-classifier picker.
          enum:
            - PRESET_TIER_UNSPECIFIED
            - PRESET_TIER_SHADOW
            - PRESET_TIER_BALANCED
            - PRESET_TIER_STRICT
          type: string
          x-speakeasy-unknown-values: allow
        requiredParams:
          description: The requiredParams field.
          items:
            $ref: '#/components/schemas/c1.api.ai_governance.v1.TemplateParam'
          type:
            - array
            - 'null'
        rules:
          description: The rules field.
          items:
            $ref: '#/components/schemas/c1.api.ai_governance.v1.AgentClassifierRule'
          type:
            - array
            - 'null'
        templateVersion:
          description: The templateVersion field.
          type: string
        tenantId:
          description: The tenantId field.
          type: string
        toolGates:
          description: The toolGates field.
          items:
            $ref: '#/components/schemas/c1.api.ai_governance.v1.ToolGateSpec'
          type:
            - array
            - 'null'
        updatedAt:
          format: date-time
          type:
            - string
            - 'null'
      title: Classifier Template
      type: object
      x-speakeasy-name-override: ClassifierTemplate
    c1.api.ai_governance.v1.HookSpec:
      description: >-
        HookSpec is the instantiable body of a built-in hook inside a template.
        Rules
         reference it by key via pre_hook_ids/post_hook_ids; instantiation rewrites the
         key to the minted Hook id.
      properties:
        celFilter:
          description: The celFilter field.
          type: string
        description:
          description: The description field.
          type: string
        displayName:
          description: The displayName field.
          type: string
        enabled:
          description: The enabled field.
          type: boolean
        eventType:
          description: >-
            Event the stamped hook fires on. When UNSPECIFIED, instantiation
            falls
             back to post_hook. Required to mint a pre-output hook, which post_hook
             cannot express.
          enum:
            - HOOK_SPEC_EVENT_TYPE_UNSPECIFIED
            - HOOK_SPEC_EVENT_TYPE_PRE_TOOL_USE
            - HOOK_SPEC_EVENT_TYPE_POST_TOOL_USE
            - HOOK_SPEC_EVENT_TYPE_PRE_OUTPUT
          type: string
          x-speakeasy-unknown-values: allow
        key:
          description: The key field.
          type: string
        patternKind:
          description: The patternKind field.
          enum:
            - HOOK_BUILT_IN_PATTERN_KIND_UNSPECIFIED
            - HOOK_BUILT_IN_PATTERN_KIND_PII_REDACTION
            - HOOK_BUILT_IN_PATTERN_KIND_CREDIT_CARD_BLOCKING
            - HOOK_BUILT_IN_PATTERN_KIND_QUERY_SCOPE_LIMIT
            - HOOK_BUILT_IN_PATTERN_KIND_WRITE_AUTHORIZATION
            - HOOK_BUILT_IN_PATTERN_KIND_SENSITIVE_FILE_GUARD
            - HOOK_BUILT_IN_PATTERN_KIND_TOOL_OUTPUT_SIZE_GUARD
            - HOOK_BUILT_IN_PATTERN_KIND_SECRETS_MASKING
            - HOOK_BUILT_IN_PATTERN_KIND_LINK_FILTER
            - HOOK_BUILT_IN_PATTERN_KIND_ENCODED_CONTENT_GUARD
            - HOOK_BUILT_IN_PATTERN_KIND_PROMPT_INJECTION_SCAN
          type: string
          x-speakeasy-unknown-values: allow
        postHook:
          description: >-
            false = pre-tool-use, true = post-tool-use. Superseded by event_type
            when
             the latter is set to a non-UNSPECIFIED value.
          type: boolean
        priority:
          description: The priority field.
          format: int32
          type: integer
      title: Hook Spec
      type: object
      x-speakeasy-name-override: HookSpec
    c1.api.ai_governance.v1.TemplateParam:
      description: >-
        TemplateParam declares a value supplied at instantiation. The UI renders
        one
         form field per param.
      properties:
        description:
          description: The description field.
          type: string
        displayName:
          description: The displayName field.
          type: string
        key:
          description: The key field.
          type: string
        required:
          description: The required field.
          type: boolean
        type:
          description: The type field.
          enum:
            - TEMPLATE_PARAM_TYPE_UNSPECIFIED
            - TEMPLATE_PARAM_TYPE_GRANT_POLICY
            - TEMPLATE_PARAM_TYPE_HOOK_FUNCTION
            - TEMPLATE_PARAM_TYPE_STRING
          type: string
          x-speakeasy-unknown-values: allow
      title: Template Param
      type: object
      x-speakeasy-name-override: TemplateParam
    c1.api.ai_governance.v1.AgentClassifierRule:
      description: AgentClassifierRule is one entry in the ordered cascade.
      properties:
        action:
          description: The action field.
          enum:
            - AGENT_CLASSIFIER_RULE_ACTION_UNSPECIFIED
            - AGENT_CLASSIFIER_RULE_ACTION_EVALUATE_HOOKS
            - AGENT_CLASSIFIER_RULE_ACTION_BLOCK
          type: string
          x-speakeasy-unknown-values: allow
        celCondition:
          description: Empty matches every tool call.
          type: string
        denyReason:
          description: The denyReason field.
          type: string
        description:
          description: The description field.
          type: string
        displayName:
          description: The displayName field.
          type: string
        id:
          description: >-
            Stable rule identifier. Leave empty on a rule being added; the
            server
             assigns one.
          type: string
        mode:
          description: The mode field.
          enum:
            - AGENT_CLASSIFIER_RULE_MODE_UNSPECIFIED
            - AGENT_CLASSIFIER_RULE_MODE_ENFORCE
            - AGENT_CLASSIFIER_RULE_MODE_OBSERVE
            - AGENT_CLASSIFIER_RULE_MODE_DISABLED
          type: string
          x-speakeasy-unknown-values: allow
        outcome:
          description: The outcome field.
          enum:
            - AGENT_CLASSIFIER_RULE_OUTCOME_UNSPECIFIED
            - AGENT_CLASSIFIER_RULE_OUTCOME_ALLOWED
            - AGENT_CLASSIFIER_RULE_OUTCOME_DENIED
          type: string
          x-speakeasy-unknown-values: allow
        postHookIds:
          description: The postHookIds field.
          items:
            type: string
          type:
            - array
            - 'null'
        preHookIds:
          description: The preHookIds field.
          items:
            type: string
          type:
            - array
            - 'null'
        preOutputHookIds:
          description: >-
            Hook ids of event type HOOK_EVENT_TYPE_PRE_OUTPUT curated by this
            rule,
             evaluated against the assistant's outgoing response rather than a tool
             call. Parallel to pre_hook_ids/post_hook_ids.
          items:
            type: string
          type:
            - array
            - 'null'
        sourceTemplateId:
          description: >-
            Rule template this rule was composed from via
            AddClassifierRuleFromTemplate.
             Empty for hand-authored rules; drives the "from template / Custom"
             provenance chip. Cleared once the rule diverges from its template.
          type: string
        systemManaged:
          description: |-
            system_managed is true for rules the platform inserts and manages
             (currently: the baseline fallback rule appended at the end of every
             policy's rule list). system-managed rules cannot be created, updated, or
             deleted through the admin API — the frontend renders them read-only.
             Persisted user rules always serialize with system_managed = false.
          type: boolean
        toolGateIds:
          description: The toolGateIds field.
          items:
            type: string
          type:
            - array
            - 'null'
      required:
        - displayName
      title: Agent Classifier Rule
      type: object
      x-speakeasy-name-override: AgentClassifierRule
    c1.api.ai_governance.v1.ToolGateSpec:
      description: ToolGateSpec is the instantiable body of a tool gate inside a template.
      properties:
        builtInPattern:
          description: >-
            Built-in pattern selector; when set, cel_expression is resolved from
            the
             registry at instantiation.
          enum:
            - TOOL_GATE_BUILT_IN_PATTERN_UNSPECIFIED
            - TOOL_GATE_BUILT_IN_PATTERN_DESTRUCTIVE_ACTION
            - TOOL_GATE_BUILT_IN_PATTERN_EXTERNAL_SEND
            - TOOL_GATE_BUILT_IN_PATTERN_THIRD_PARTY_CONNECTOR
            - TOOL_GATE_BUILT_IN_PATTERN_FINANCE_ACTION
            - TOOL_GATE_BUILT_IN_PATTERN_INFRA_MUTATION
            - TOOL_GATE_BUILT_IN_PATTERN_DB_WRITE
          type: string
          x-speakeasy-unknown-values: allow
        celExpression:
          description: The celExpression field.
          type: string
        description:
          description: The description field.
          type: string
        displayName:
          description: The displayName field.
          type: string
        enabled:
          description: The enabled field.
          type: boolean
        grantPolicyParamKey:
          description: The grantPolicyParamKey field.
          type: string
        key:
          description: The key field.
          type: string
        priority:
          description: The priority field.
          format: int32
          type: integer
      title: Tool Gate Spec
      type: object
      x-speakeasy-name-override: ToolGateSpec
  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

````