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

# Generate Google Ads campaign brief

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

Writes a campaign brief for you from a few business details, and saves it.

Send the business name, what it does, its landing page, and any keywords you already have. Base44 writes ad headlines and descriptions from those details, and saves them as a new brief. `source` on the response is `ai`, which is how you tell a generated brief from one you wrote.

The copy is written in whichever language the details you send are in, and that language is recorded on the brief. Base44 does not open the landing page to work this out, so it passes the URL along as text and nothing more. A German site described in English produces English copy.

This runs a language model, so it is slower than the other endpoints here and it draws on a per-app quota shared with the other Google Ads generation endpoints. The default is 20 requests a minute, and your workspace's plan can raise it, so treat the 429 rather than a fixed count as the signal you have run out.

<Warning>A generation failure still returns a 200 with a saved brief. Base44 records the failure on its side and hands back a brief whose `headlines` and `descriptions` are empty, still marked `source: ai`. Check that those two lists are non-empty before you use the result.</Warning>

<Warning>This creates a new brief every time it is called. There is nothing that keeps one brief per campaign type, so a retried request leaves you with duplicates. Read the list first and use [Update campaign brief](/api-reference/update-google-ads-campaign-brief) when you already have one.</Warning>

<Warning>The response includes fields beyond the ones documented here. Don't rely on undocumented response fields, as they can change at any time. Send only the fields documented here. Other request fields are not supported and their behavior can change.</Warning>



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json post /api/apps/{app_id}/google-ads/campaign-briefs/generate
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/campaign-briefs/generate:
    post:
      summary: Generate Google Ads campaign brief
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Writes a campaign brief for you from a few business details, and saves
        it.


        Send the business name, what it does, its landing page, and any keywords
        you already have. Base44 writes ad headlines and descriptions from those
        details, and saves them as a new brief. `source` on the response is
        `ai`, which is how you tell a generated brief from one you wrote.


        The copy is written in whichever language the details you send are in,
        and that language is recorded on the brief. Base44 does not open the
        landing page to work this out, so it passes the URL along as text and
        nothing more. A German site described in English produces English copy.


        This runs a language model, so it is slower than the other endpoints
        here and it draws on a per-app quota shared with the other Google Ads
        generation endpoints. The default is 20 requests a minute, and your
        workspace's plan can raise it, so treat the 429 rather than a fixed
        count as the signal you have run out.


        <Warning>A generation failure still returns a 200 with a saved brief.
        Base44 records the failure on its side and hands back a brief whose
        `headlines` and `descriptions` are empty, still marked `source: ai`.
        Check that those two lists are non-empty before you use the
        result.</Warning>


        <Warning>This creates a new brief every time it is called. There is
        nothing that keeps one brief per campaign type, so a retried request
        leaves you with duplicates. Read the list first and use [Update campaign
        brief](/api-reference/update-google-ads-campaign-brief) when you already
        have one.</Warning>


        <Warning>The response includes fields beyond the ones documented here.
        Don't rely on undocumented response fields, as they can change at any
        time. Send only the fields documented here. Other request fields are not
        supported and their behavior can change.</Warning>
      operationId: >-
        generate_campaign_brief_api_apps__app_id__google_ads_campaign_briefs_generate_post
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the app whose Google Ads campaigns to manage.
            title: App Id
          description: ID of the app whose Google Ads campaigns to manage.
          example: 6820f3a4e7b91d003c45a1f2
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateBriefRequest'
            example:
              platform_type: SMART
              business_name: Nordwind Furniture
              business_description: Handmade oak furniture, delivered across Germany.
              landing_page_url: https://example.com/spring
              keywords:
                - oak furniture
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignBriefResource'
        '401':
          description: Missing or invalid credentials.
        '403':
          description: >-
            You don't have access to this app or the app does not exist. A
            missing app and an app you cannot reach are deliberately the same
            answer. Marketing setup, campaign edits, generation and resuming
            also return `app_marketing_not_allowed` when the app's owning
            workspace has the FERPA designation. Historical reads, pausing,
            deletion and financial settlement remain available.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: >-
            The app has used up its Google Ads generation quota for the current
            window. Retry later.
        '503':
          description: >-
            Database temporarily unavailable (`database_unavailable`): the data
            cluster did not answer in time. Retry after the `Retry-After`
            seconds.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
              examples:
                database_unavailable:
                  summary: database_unavailable
                  value:
                    error:
                      code: database_unavailable
                      message: Database temporarily unavailable, please retry
                      details: {}
      security:
        - PersonalAccessTokenAuth:
            - full_access
        - WorkspaceApiKeyAuth:
            - full_access
        - WorkspaceApiKeyBearerAuth:
            - full_access
components:
  schemas:
    GenerateBriefRequest:
      properties:
        platform_type:
          type: string
          title: Platform Type
          description: >-
            Which campaign type the brief is for, `SMART` or `PERFORMANCE_MAX`.
            Stored as sent and not checked against that list.
          default: PERFORMANCE_MAX
        business_name:
          type: string
          title: Business Name
          description: Business name to advertise.
          default: ''
        business_description:
          type: string
          title: Business Description
          description: What the business does. Used when Base44 generates copy.
          default: ''
        landing_page_url:
          type: string
          title: Landing Page Url
          description: URL the ads will send clicks to.
          default: ''
        keywords:
          items:
            type: string
          type: array
          title: Keywords
          description: Keywords the campaign should match.
      type: object
      title: GenerateBriefRequest
    CampaignBriefResource:
      properties:
        id:
          type: string
          title: Id
          description: >-
            ID of the brief. Pass this as `brief_id` to read, update, or delete
            it.
          example: 68b1c0d4e7b91d003c45a1f5
        platform_type:
          type: string
          title: Platform Type
          description: Which campaign type the brief is for, `SMART` or `PERFORMANCE_MAX`.
          example: PERFORMANCE_MAX
        source:
          type: string
          title: Source
          description: >-
            Who wrote the brief. The value is `ai` when Base44 generated it and
            `user` when you created it.
          example: user
        business_name:
          type: string
          title: Business Name
          description: Business name to advertise.
          example: Nordwind Furniture
        business_description:
          type: string
          title: Business Description
          description: What the business does. Base44 uses this when it generates copy.
          example: Handmade oak furniture, delivered across Germany.
        landing_page_url:
          type: string
          title: Landing Page Url
          description: URL the ads will send clicks to.
          example: https://example.com/spring
        language:
          type: string
          title: Language
          description: >-
            Language the ad copy is written in, as a lowercase two-letter code.
            See the note on this field in each endpoint. Create and update echo
            what you send, while list and get report the normalized value.
          example: en
        keywords:
          items:
            type: string
          type: array
          title: Keywords
          description: Keywords the campaign should match.
          example:
            - oak furniture
            - handmade table
        target_audience:
          type: string
          title: Target Audience
          description: Free-text description of who the campaign is for. Empty when unset.
          example: Homeowners aged 30 to 55
        daily_budget_micros:
          type: integer
          title: Daily Budget Micros
          description: >-
            Planned daily budget in micros of the account currency, so
            `15000000` is 15.00. The value is `0` when unset.
          example: 15000000
        geo_targets:
          items:
            type: string
          type: array
          title: Geo Targets
          description: Google Ads geo target constant IDs to target.
          example:
            - '1003854'
        headlines:
          items:
            type: string
          type: array
          title: Headlines
          description: Ad headlines. Populated by generate, or by you.
          example:
            - Handmade oak furniture
        descriptions:
          items:
            type: string
          type: array
          title: Descriptions
          description: Ad description lines.
          example:
            - Built to last. Delivered free.
        schedule_type:
          type: string
          title: Schedule Type
          description: >-
            When the campaign runs. Use `always` to run continuously, or
            `custom` to use `schedule_days`.
          example: always
        schedule_days:
          items:
            $ref: '#/components/schemas/CampaignBriefScheduleDay'
          type: array
          title: Schedule Days
          description: >-
            Day and hour windows the campaign is planned to run in, returned as
            they were sent.
          example:
            - day: MONDAY
              end_hour: 17
              start_hour: 9
        created_date:
          type: string
          format: date-time
          title: Created Date
          description: When the brief was created.
          example: '2026-08-25T11:20:00Z'
        updated_date:
          type: string
          format: date-time
          title: Updated Date
          description: When the brief was last changed.
          example: '2026-08-25T14:05:00Z'
      type: object
      required:
        - id
        - platform_type
        - source
        - business_name
        - business_description
        - landing_page_url
        - language
        - keywords
        - target_audience
        - daily_budget_micros
        - geo_targets
        - headlines
        - descriptions
        - schedule_type
        - schedule_days
        - created_date
        - updated_date
      title: CampaignBriefResource
      description: A saved campaign brief.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    StandardErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/StandardError'
          description: What went wrong.
      type: object
      required:
        - error
      title: StandardErrorEnvelope
      description: The error body returned in the standard envelope.
    CampaignBriefScheduleDay:
      properties:
        day:
          anyOf:
            - type: string
            - type: 'null'
          title: Day
          description: Day of the week, such as `MONDAY`.
          example: MONDAY
        start_hour:
          anyOf:
            - type: integer
            - type: 'null'
          title: Start Hour
          description: Hour the window opens, 0 to 23.
          example: 9
        end_hour:
          anyOf:
            - type: integer
            - type: 'null'
          title: End Hour
          description: Hour the window closes, 1 to 24, where 24 is midnight.
          example: 17
      type: object
      title: CampaignBriefScheduleDay
      description: One day-and-hours window on a campaign brief.
    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
    StandardError:
      properties:
        code:
          type: string
          title: Code
          description: >-
            Stable machine-readable cause of the failure. Match on this, not on
            `message`.
          example: not_found
        message:
          type: string
          title: Message
          description: Human-readable explanation. It isn't a stable contract.
          example: App not found
        details:
          additionalProperties: true
          type: object
          title: Details
          description: >-
            Structured context for the failure, or an empty object when there's
            none.
          example: {}
      type: object
      required:
        - code
        - message
      title: StandardError
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: >-
        Personal access token, sent as `Authorization: Bearer <token>`. Each
        operation lists the permission it needs: `read_only` or `full_access`. A
        full-access token can call every operation. A read-only token can call
        only the operations that list `read_only`; anything else returns 403
        `read_only_credential_route_not_allowed`.
    WorkspaceApiKeyAuth:
      type: apiKey
      in: header
      name: api_key
      description: >-
        Workspace API key, sent as `api_key: <key>`. Each operation that accepts
        one lists what the key needs: a permission, `read_only` or
        `full_access`, like a personal access token, or a scope. A key without
        the scope gets 403 `workspace_api_key_scope_required`.
    WorkspaceApiKeyBearerAuth:
      type: http
      scheme: bearer
      description: >-
        Workspace API key, sent as `Authorization: Bearer <key>`. Accepted
        wherever `api_key` is, with the same permission.

````

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