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

> ## Agent Instructions
> Internal links on these pages omit the .md extension. Append .md to a docs page URL, or send an Accept: text/markdown header, to get that page as markdown.

# Regenerate a Google Ads setup keyword theme

> <Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Suggests one new keyword theme to replace one you rejected, for a campaign you have not launched yet.

Send the theme to replace as `current` and every theme already in the campaign as `existing`. A language model writes one replacement from the app's own content, and Base44 checks that it differs from all of them, ignoring case.

The call returns a 200 with `keyword_theme` set to `null` when there is no new theme: the app has nothing to read, the model fails, or it only comes up with themes you already have. Keep the old theme then. Nothing is saved.

<Note>This endpoint runs a language model and draws on a shared quota of 20 requests per minute per app, which every Google Ads AI endpoint debits. Enterprise workspaces get a higher quota. A 429 means the quota is spent, not that this endpoint has its own limit.</Note>

It is refused with a 409 while the workspace is on a Google Ads billing hold. Running the model does not spend credits.

<Note>This endpoint accepts a personal API key from anyone who can edit the app. A read-only key is refused with a 403, and so are workspace API keys.</Note>



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json post /api/apps/{app_id}/google-ads/setup-suggestions/regenerate-keyword
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - PersonalAccessTokenAuth: []
paths:
  /api/apps/{app_id}/google-ads/setup-suggestions/regenerate-keyword:
    post:
      summary: Regenerate a Google Ads setup keyword theme
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Suggests one new keyword theme to replace one you rejected, for a
        campaign you have not launched yet.


        Send the theme to replace as `current` and every theme already in the
        campaign as `existing`. A language model writes one replacement from the
        app's own content, and Base44 checks that it differs from all of them,
        ignoring case.


        The call returns a 200 with `keyword_theme` set to `null` when there is
        no new theme: the app has nothing to read, the model fails, or it only
        comes up with themes you already have. Keep the old theme then. Nothing
        is saved.


        <Note>This endpoint runs a language model and draws on a shared quota of
        20 requests per minute per app, which every Google Ads AI endpoint
        debits. Enterprise workspaces get a higher quota. A 429 means the quota
        is spent, not that this endpoint has its own limit.</Note>


        It is refused with a 409 while the workspace is on a Google Ads billing
        hold. Running the model does not spend credits.


        <Note>This endpoint accepts a personal API key from anyone who can edit
        the app. A read-only key is refused with a 403, and so are workspace API
        keys.</Note>
      operationId: >-
        regenerate_setup_keyword_api_apps__app_id__google_ads_setup_suggestions_regenerate_keyword_post
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the app you are setting up Google Ads for.
            title: App Id
          description: ID of the app you are setting up Google Ads for.
          example: 6820f3a4e7b91d003c45a1f2
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoogleAdsRegenerateKeywordRequest'
      responses:
        '200':
          description: One replacement theme, or `null`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleAdsRegeneratedKeywordTheme'
        '401':
          description: Missing or invalid credentials.
        '403':
          description: >-
            You can't edit this app, the app does not exist, or you used a
            read-only or workspace API key. A missing app and an app you cannot
            reach are deliberately the same answer.
        '409':
          description: The workspace is on a Google Ads billing hold.
        '422':
          description: >-
            The body has a field other than `current` and `existing`, or a field
            of the wrong type.
        '429':
          description: >-
            The app has used up its 20 language-model requests a minute. Retry
            later.
components:
  schemas:
    GoogleAdsRegenerateKeywordRequest:
      properties:
        current:
          type: string
          title: Current
          description: The theme to replace. Only its first 80 characters are used.
          default: ''
          example: phone repair
        existing:
          items:
            type: string
          type: array
          title: Existing
          description: >-
            Every theme already in the campaign, so the replacement is new. Only
            the first 25 are used, each cut to 80 characters.
          example:
            - phone repair
            - screen replacement
            - battery replacement
      additionalProperties: false
      type: object
      title: GoogleAdsRegenerateKeywordRequest
    GoogleAdsRegeneratedKeywordTheme:
      properties:
        keyword_theme:
          anyOf:
            - type: string
            - type: 'null'
          title: Keyword Theme
          description: >-
            A theme that is not `current` and not in `existing`, or `null` when
            there is no new one. Keep the theme you had on a `null`.
          example: cracked screen fix
      type: object
      required:
        - keyword_theme
      title: GoogleAdsRegeneratedKeywordTheme
      description: One replacement keyword theme.
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: 'Personal access token, sent as `Authorization: Bearer <token>`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.