> ## 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.

# Create Keywords

> Create keywords in an ad group.



## OpenAPI

````yaml https://dev-api.cattix.com/openapi.json post /api/v1/google-ads/keywords
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/google-ads/keywords:
    post:
      tags:
        - Google Ads Management
      summary: Create Keywords
      description: Create keywords in an ad group.
      operationId: create_keywords_api_v1_google_ads_keywords_post
      parameters:
        - name: customer_id
          in: query
          required: true
          schema:
            type: integer
            title: Customer Id
        - name: token_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: Optional specific Token ID
            title: Token Id
          description: Optional specific Token ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateKeywordsRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchKeywordOperationResponseSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    CreateKeywordsRequest:
      properties:
        ad_group_id:
          type: integer
          title: Ad Group Id
          description: Ad group to add keywords to
        keywords:
          items:
            $ref: '#/components/schemas/KeywordInput'
          type: array
          minItems: 1
          title: Keywords
          description: Keywords to create
      type: object
      required:
        - ad_group_id
        - keywords
      title: CreateKeywordsRequest
      description: Request to create keywords in an ad group.
    BatchKeywordOperationResponseSchema:
      properties:
        successful_operations:
          items:
            $ref: '#/components/schemas/KeywordOperationResultSchema'
          type: array
          title: Successful Operations
          description: List of successful keyword operations
        failed_operations:
          items:
            $ref: '#/components/schemas/KeywordOperationResultSchema'
          type: array
          title: Failed Operations
          description: List of failed keyword operations
      type: object
      title: BatchKeywordOperationResponseSchema
      description: Schema for batch keyword operation responses
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    KeywordInput:
      properties:
        text:
          type: string
          minLength: 1
          title: Text
          description: Keyword text
        match_type:
          $ref: '#/components/schemas/KeywordMatchTypeEnum'
          description: Match type (EXACT, PHRASE, BROAD)
          default: PHRASE
      type: object
      required:
        - text
      title: KeywordInput
      description: A single keyword to create.
    KeywordOperationResultSchema:
      properties:
        ad_group_id:
          type: integer
          title: Ad Group Id
        criterion_id:
          type: integer
          title: Criterion Id
        success:
          type: boolean
          title: Success
        resource_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Resource Name
          description: The resource name of the updated criterion if successful
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: Error message if the operation failed
      type: object
      required:
        - ad_group_id
        - criterion_id
        - success
      title: KeywordOperationResultSchema
      description: Schema for the result of a keyword operation
    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
    KeywordMatchTypeEnum:
      type: string
      enum:
        - EXACT
        - PHRASE
        - BROAD
      title: KeywordMatchTypeEnum
      description: Keyword match types.
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: api/v1/users/authorization/token

````