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

# Add a keyword to an ad group

> Create a new keyword within an ad group.



## OpenAPI

````yaml https://dev-api.cattix.com/openapi.json post /api/v1/campaigns/drafts/{draft_id}/ad-groups/{ad_group_id}/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/campaigns/drafts/{draft_id}/ad-groups/{ad_group_id}/keywords:
    post:
      tags:
        - Campaigns
      summary: Add a keyword to an ad group
      description: Create a new keyword within an ad group.
      operationId: >-
        create_keyword_api_v1_campaigns_drafts__draft_id__ad_groups__ad_group_id__keywords_post
      parameters:
        - name: draft_id
          in: path
          required: true
          schema:
            type: integer
            title: Draft Id
        - name: ad_group_id
          in: path
          required: true
          schema:
            type: integer
            title: Ad Group Id
        - name: regenerate_rsas
          in: query
          required: false
          schema:
            type: boolean
            description: Auto-regenerate RSAs for the parent ad group
            default: true
            title: Regenerate Rsas
          description: Auto-regenerate RSAs for the parent ad group
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateKeywordRequestSchema'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignDraftKeywordSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    CreateKeywordRequestSchema:
      properties:
        text:
          type: string
          maxLength: 80
          minLength: 1
          title: Text
          description: The keyword phrase
        match_type:
          $ref: '#/components/schemas/KeywordMatchTypes'
          default: PHRASE
        cpc_bid_micros:
          anyOf:
            - type: integer
              ge: 0
              le: 50000000000
            - type: 'null'
          title: Cpc Bid Micros
          description: Optional keyword level bid
        final_url:
          anyOf:
            - type: string
              maxLength: 2083
              minLength: 1
              format: uri
            - type: 'null'
          title: Final Url
          description: Optional keyword-level URL
      type: object
      required:
        - text
      title: CreateKeywordRequestSchema
      description: Request to create a keyword in an ad group.
    CampaignDraftKeywordSchema:
      properties:
        id:
          type: integer
          title: Id
        text:
          type: string
          title: Text
        match_type:
          $ref: '#/components/schemas/KeywordMatchTypes'
        cpc_bid_micros:
          anyOf:
            - type: integer
              maximum: 50000000000
              minimum: 0
            - type: 'null'
          title: Cpc Bid Micros
        final_url:
          anyOf:
            - type: string
              maxLength: 2083
              minLength: 1
              format: uri
            - type: 'null'
          title: Final Url
        source_market_analysis_keyword_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Source Market Analysis Keyword Id
      type: object
      required:
        - id
        - text
        - match_type
      title: CampaignDraftKeywordSchema
      description: Keyword within a draft ad group.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    KeywordMatchTypes:
      type: string
      enum:
        - EXACT
        - PHRASE
        - BROAD
        - BROAD_MODIFIER
        - NEGATIVE
      title: KeywordMatchTypes
      description: The keyword match types.
    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

````