> ## 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 Ad Group

> Create a new ad group in a campaign.



## OpenAPI

````yaml https://dev-api.cattix.com/openapi.json post /api/v1/google-ads/ad-groups
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/ad-groups:
    post:
      tags:
        - Google Ads Management
      summary: Create Ad Group
      description: Create a new ad group in a campaign.
      operationId: create_ad_group_api_v1_google_ads_ad_groups_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/CreateAdGroupRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdGroupMutationResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    CreateAdGroupRequest:
      properties:
        campaign_id:
          type: integer
          title: Campaign Id
          description: Campaign ID to create the ad group in
        name:
          type: string
          maxLength: 256
          minLength: 1
          title: Name
          description: Ad group name
        ad_group_type:
          $ref: '#/components/schemas/AdGroupTypeEnum'
          description: Ad group type
          default: SEARCH_STANDARD
        status:
          $ref: '#/components/schemas/AdGroupStatusEnum'
          description: Initial ad group status
          default: ENABLED
        cpc_bid_micros:
          anyOf:
            - type: integer
              exclusiveMinimum: 0
            - type: 'null'
          title: Cpc Bid Micros
          description: Default CPC bid in micros
      type: object
      required:
        - campaign_id
        - name
      title: CreateAdGroupRequest
      description: Request to create a new ad group.
    AdGroupMutationResult:
      properties:
        success:
          type: boolean
          title: Success
        ad_group_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Ad Group Id
        resource_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Resource Name
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
      type: object
      required:
        - success
      title: AdGroupMutationResult
      description: Result of an ad group mutation operation.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AdGroupTypeEnum:
      type: string
      enum:
        - SEARCH_STANDARD
        - DISPLAY_STANDARD
        - SHOPPING_PRODUCT_ADS
      title: AdGroupTypeEnum
      description: Ad group types supported for creation.
    AdGroupStatusEnum:
      type: string
      enum:
        - ENABLED
        - PAUSED
      title: AdGroupStatusEnum
      description: Ad group statuses.
    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

````