> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cattix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Trigger Analysis By Type

> Trigger the analysis of the `{analysis_type}`.

Args:
    analysis_type (str): The type of analysis to trigger (e.g., "negative_keywords").
    customer_id (int): The Google Ads customer ID.
    login_customer_id (int): The Google Ads login customer ID.
    temperature (float): The temperature for the analysis. Defaults to settings.OPENROUTER_DEFAULT_TEMPERATURE.
    approved_user (User): The approved user making the request.

Returns:
    TriggerAnalysisResultSchema: The result of the analysis trigger.

Raises:
    HTTPException: 403 if the user does not have access to the customer.



## OpenAPI

````yaml https://dev-api.cattix.com/openapi.json post /api/v1/analysis/trigger/{analysis_type}
openapi: 3.1.0
info:
  title: CATTIX API
  description: CATTIX Backend API
  version: 0.107.0
servers:
  - url: http://localhost:8000
    description: Local
  - url: https://dev-api.cattix.com
    description: Development
  - url: https://staging-api.cattix.com
    description: Staging
  - url: https://api.cattix.com
    description: Production
security: []
paths:
  /api/v1/analysis/trigger/{analysis_type}:
    post:
      tags:
        - Analysis
      summary: Trigger Analysis By Type
      description: |-
        Trigger the analysis of the `{analysis_type}`.

        Args:
            analysis_type (str): The type of analysis to trigger (e.g., "negative_keywords").
            customer_id (int): The Google Ads customer ID.
            login_customer_id (int): The Google Ads login customer ID.
            temperature (float): The temperature for the analysis. Defaults to settings.OPENROUTER_DEFAULT_TEMPERATURE.
            approved_user (User): The approved user making the request.

        Returns:
            TriggerAnalysisResultSchema: The result of the analysis trigger.

        Raises:
            HTTPException: 403 if the user does not have access to the customer.
      operationId: trigger_analysis_by_type_api_v1_analysis_trigger__analysis_type__post
      parameters:
        - name: analysis_type
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/AnalysisTypes'
        - name: customer_id
          in: query
          required: true
          schema:
            type: integer
            title: Customer Id
        - name: login_customer_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Login Customer Id
        - name: temperature
          in: query
          required: false
          schema:
            type: number
            default: 0.2
            title: Temperature
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerAnalysisResultSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    AnalysisTypes:
      type: string
      enum:
        - keyword_pause
        - negative_keyword
        - double_check_keywords_to_pause
        - headline
        - description
        - budget_migration
        - pause_hours
        - pause_locations
        - search_terms
      title: AnalysisTypes
      description: The types of analyses.
    TriggerAnalysisResultSchema:
      properties:
        success:
          type: boolean
          title: Success
        message:
          type: string
          title: Message
      type: object
      required:
        - success
        - message
      title: TriggerAnalysisResultSchema
      description: The schema for the result of triggering an analysis.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: api/v1/users/authorization/token

````