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

# Create Google Ads campaign

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

Creates a campaign on the app's Google Ads account and starts serving it.

This spends money. The workspace needs a payment method on file and an account in good standing. Without either, the call returns a 402 and no campaign is created. A campaign is also created paused when the app's conversion tracking is not yet verified, so check `status` on the response rather than assuming it is serving.

Set `campaign_type` to one of its listed values. Google stopped accepting new Smart campaigns on September 23, 2026, so `SMART` and any type not listed return a 400 before anything is created. `daily_budget_micros` is in micros of the account currency and has a per-currency floor Google enforces. A budget below it comes back as a 400 carrying Google's reason, and the campaign is not created. Advertisers in the EU must declare whether the campaign carries political advertising. The call is rejected until that declaration is on file.

Google validates the campaign as it is created, so a rejected ad text, an unreachable landing page, or a budget below the floor comes back as a 400 with Google's own reason.

<Note>This endpoint accepts a personal API key. Workspace API keys are not authorized for it and are rejected with a 403.</Note>

<Warning>A 409 means the change may or may not have been applied. The request to Google Ads timed out after it was sent. Read the campaign back with [Get campaign](/api-reference/get-google-ads-campaign) before retrying, or you can end up applying it twice.</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/campaigns
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/campaigns:
    post:
      summary: Create Google Ads campaign
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Creates a campaign on the app's Google Ads account and starts serving
        it.


        This spends money. The workspace needs a payment method on file and an
        account in good standing. Without either, the call returns a 402 and no
        campaign is created. A campaign is also created paused when the app's
        conversion tracking is not yet verified, so check `status` on the
        response rather than assuming it is serving.


        Set `campaign_type` to one of its listed values. Google stopped
        accepting new Smart campaigns on September 23, 2026, so `SMART` and any
        type not listed return a 400 before anything is created.
        `daily_budget_micros` is in micros of the account currency and has a
        per-currency floor Google enforces. A budget below it comes back as a
        400 carrying Google's reason, and the campaign is not created.
        Advertisers in the EU must declare whether the campaign carries
        political advertising. The call is rejected until that declaration is on
        file.


        Google validates the campaign as it is created, so a rejected ad text,
        an unreachable landing page, or a budget below the floor comes back as a
        400 with Google's own reason.


        <Note>This endpoint accepts a personal API key. Workspace API keys are
        not authorized for it and are rejected with a 403.</Note>


        <Warning>A 409 means the change may or may not have been applied. The
        request to Google Ads timed out after it was sent. Read the campaign
        back with [Get campaign](/api-reference/get-google-ads-campaign) before
        retrying, or you can end up applying it twice.</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: create_campaign_api_apps__app_id__google_ads_campaigns_post
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the app to advertise.
            title: App Id
          description: ID of the app to advertise.
          example: 6820f3a4e7b91d003c45a1f2
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCampaignRequest'
            example:
              campaign_name: Spring sale in Berlin
              campaign_type: PERFORMANCE_MAX
              daily_budget_micros: 15000000
              landing_page: https://example.com/spring
              keyword_themes:
                - spring sale
                - discount furniture
              geo_targets:
                - '1003854'
              headlines:
                - Oak dining tables
                - Spring sale on now
                - Made in Berlin
              descriptions:
                - Solid oak, built to order.
                - Free delivery across Germany this spring.
              logo_url: https://storage.base44.com/gads-assets/b7f3a1c8-logo.png
              images:
                - url: >-
                    https://storage.base44.com/gads-assets/b7f3a1c8-landscape.png
                  field_type: MARKETING_IMAGE
                - url: https://storage.base44.com/gads-assets/b7f3a1c8-square.png
                  field_type: SQUARE_MARKETING_IMAGE
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignResource'
        '400':
          description: >-
            Google Ads rejected the request, for example ad text that breaks its
            policies or a budget below the currency's minimum. The response
            message carries Google's reason.
        '401':
          description: Missing or invalid credentials.
        '402':
          description: No payment method on file, or the workspace has an unpaid balance.
        '403':
          description: >-
            You don't have access to this app, the app does not exist, or you
            used a workspace API key. 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.
        '404':
          description: >-
            The app has no connected Google Ads account, or there is no campaign
            with this ID.
        '409':
          description: >-
            The request to Google Ads timed out after being sent and the
            campaign may be live (read the campaigns back before retrying),
            another campaign is being created on this account right now
            (`error.code` `campaign_create_in_progress`; list the campaigns and
            retry only if the one you meant is not there, since a retry after it
            lands creates a second campaign), a campaign with this name exists
            in Google Ads but hasn't synced here (`error.code`
            `campaign_name_exists_on_google`; do not retry), a previous Smart
            campaign didn't finish setting up (`error.code`
            `incomplete_campaign_exists`; delete it first), or a product
            campaign's Google Ads account has no website purchase conversion
            goal (`error.code` `purchase_goal_unavailable`; set up purchase
            tracking first).
        '422':
          description: >-
            A field breaks a rule documented on it, for example more than 25
            `excluded_terms`, more than 5 `youtube_videos`, or a location both
            targeted and excluded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Google Ads is rate limiting the account. 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
components:
  schemas:
    CreateCampaignRequest:
      properties:
        campaign_name:
          type: string
          title: Campaign Name
          description: Name for the campaign.
        campaign_type:
          type: string
          enum:
            - PERFORMANCE_MAX
          title: Campaign Type
          description: Which campaign type to create.
          default: PERFORMANCE_MAX
        daily_budget_micros:
          type: integer
          maximum: 162750000000
          exclusiveMinimum: 0
          title: Daily Budget Micros
          description: >-
            Daily budget in micros of the account currency, so `15000000` is
            15.00. Google enforces a per-currency minimum and rejects anything
            below it with a 400.
        keyword_themes:
          items:
            type: string
          type: array
          title: Keyword Themes
          description: Themes to match searches on.
        keywords:
          items:
            type: string
          type: array
          title: Keywords
          description: Deprecated and not used for targeting. Send `keyword_themes`.
          deprecated: true
        headlines:
          items:
            type: string
          type: array
          title: Headlines
          description: Ad headlines. Google reviews these against its advertising policies.
        long_headlines:
          items:
            type: string
          type: array
          title: Long Headlines
          description: >-
            Long headlines for a `PERFORMANCE_MAX` campaign, up to 5. Each is
            shortened to 90 characters without cutting a word. When you send
            none, the first headline is used. Google reviews these against its
            advertising policies.
        descriptions:
          items:
            type: string
          type: array
          title: Descriptions
          description: >-
            Ad description lines. Google reviews these against its advertising
            policies.
        geo_targets:
          items:
            type: string
          type: array
          title: Geo Targets
          description: Google Ads geo target constant IDs to target.
        excluded_geo_targets:
          items:
            type: string
          type: array
          title: Excluded Geo Targets
          description: >-
            Google Ads geo target constant IDs to keep the ads out of. A
            location can't be both targeted and excluded.
        excluded_terms:
          items:
            type: string
          type: array
          title: Excluded Terms
          description: >-
            Search terms the ads must not show for, up to 25, matched exactly. A
            comma or semicolon splits an entry into separate terms.
        sitelinks:
          items:
            properties:
              text:
                type: string
                description: >-
                  Link text. Google shows at most 25 characters, and Base44 cuts
                  longer text down to 25 rather than rejecting it.
                example: Visit our showroom
              url:
                type: string
                description: Where the link goes, as an `http` or `https` address.
                example: https://example.com/showroom
            type: object
            required:
              - text
              - url
          type: array
          title: Sitelinks
          description: >-
            Extra links shown under a `PERFORMANCE_MAX` campaign's ads, up to
            20. A row with neither `text` nor `url` is dropped, a row with only
            one of them is rejected, and exact duplicates collapse to one. Each
            `url` needs a full domain, such as `example.com`.
        landing_page:
          anyOf:
            - type: string
            - type: 'null'
          title: Landing Page
          description: >-
            URL the ads send clicks to. Google rejects the campaign if it cannot
            reach this page.
        business_name:
          type: string
          title: Business Name
          description: Business name shown in the ad.
          default: ''
        logo_url:
          type: string
          title: Logo Url
          description: >-
            URL of the logo, at least 128×128. Required for a `PERFORMANCE_MAX`
            campaign. It follows the same hosting rules as `images[].url`, but
            unlike an image a logo Base44 cannot fetch fails the request instead
            of being left out. A logo that is not square is padded to square.
          default: ''
        settings:
          properties:
            language_code:
              type: string
              description: >-
                Two-letter code for the language the ad copy is written in,
                which becomes the campaign's advertising language. English when
                absent or unsupported — `Accept-Language` does not affect it.
                Pass through `settings` from [Suggest Google Ads
                campaigns](/api-reference/suggest-google-ads-campaigns) to keep
                a generated campaign's targeting on its copy's language.
          type: object
          title: Settings
          description: >-
            Campaign settings. Only `language_code` is supported. Leave other
            keys out.
        schedule_type:
          type: string
          title: Schedule Type
          description: >-
            Set to `custom` to run the ads only in the `schedule_days` windows.
            Any other value runs them all the time.
          default: always
        schedule_days:
          items:
            properties:
              day:
                type: string
                description: Day of the week, `MONDAY` to `SUNDAY`.
              start_hour:
                type: integer
                description: Hour the window opens, 0 to 23.
                default: 0
              end_hour:
                type: integer
                description: Hour the window closes, 1 to 24, where 24 is midnight.
                default: 24
            type: object
            required:
              - day
          type: array
          title: Schedule Days
          description: >-
            When the ads run, used only when `schedule_type` is `custom`. Hours
            are whole hours in the Google Ads account's time zone. Google
            rejects the campaign for an invalid day or hour.
        images:
          items:
            properties:
              url:
                type: string
                description: >-
                  Address of the image. It has to be `https` on a host Base44
                  fetches images from, such as an address on `base44.com` or
                  `base44.app`. Use a static PNG, JPEG, or GIF of 5 MB or less.
                example: https://storage.base44.com/gads-assets/b7f3a1c8-landscape.png
              field_type:
                type: string
                enum:
                  - MARKETING_IMAGE
                  - SQUARE_MARKETING_IMAGE
                  - PORTRAIT_MARKETING_IMAGE
                  - TALL_PORTRAIT_MARKETING_IMAGE
                description: >-
                  Which slot the image fills. Base44 does not crop or resize, so
                  the image has to match its slot's shape to within 1% already,
                  or Google rejects it:

                  - `MARKETING_IMAGE` is 1.91:1 landscape, at least 600×314.

                  - `SQUARE_MARKETING_IMAGE` is 1:1, at least 300×300.

                  - `PORTRAIT_MARKETING_IMAGE` is 4:5, at least 480×600.

                  - `TALL_PORTRAIT_MARKETING_IMAGE` is 9:16, at least 600×1067.


                  Defaults to `MARKETING_IMAGE`, and a value outside this list
                  is treated as `MARKETING_IMAGE` too.
                default: MARKETING_IMAGE
                example: MARKETING_IMAGE
              name:
                type: string
                description: Label for the image in Google Ads. Defaults to `image`.
                example: Showroom landscape
            type: object
            required:
              - url
          type: array
          title: Images
          description: >-
            Marketing images for a `PERFORMANCE_MAX` campaign. It needs at least
            one `MARKETING_IMAGE` and one `SQUARE_MARKETING_IMAGE`, and Google
            rejects the campaign without them.


            Base44 leaves out an image it cannot fetch, rather than rejecting
            the request. That includes an address on another host, a file over 5
            MB, and one that does not respond. If that leaves a required slot
            empty, Google rejects the campaign for the missing image. An address
            that returns something other than an image is rejected outright.
        youtube_videos:
          items:
            type: string
          type: array
          title: Youtube Videos
          description: >-
            Up to 5 YouTube videos for a `PERFORMANCE_MAX` campaign, each a
            YouTube link or an 11-character video ID. To use a video file,
            upload it with [Upload a Google Ads
            video](/api-reference/upload-a-google-ads-video) and pass the ID it
            returns.
        youtube_video:
          type: string
          title: Youtube Video
          description: Deprecated. A single video, added to `youtube_videos`.
          default: ''
          deprecated: true
        phone_number:
          type: string
          title: Phone Number
          description: >-
            Phone number shown in the ad, as a call asset. It must be in
            international format with the country code (e.g. +18506168085) —
            Google needs the country alongside the number, and any other format
            is rejected with a 400. Omit for no phone.
          default: ''
        contains_eu_political_advertising:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Contains Eu Political Advertising
          description: >-
            Whether the campaign carries political advertising. Required before
            an EU advertiser can create a campaign.
      type: object
      required:
        - campaign_name
        - daily_budget_micros
      title: CreateCampaignRequest
    CampaignResource:
      properties:
        id:
          type: string
          title: Id
          description: >-
            Base44's ID for the campaign. Pass this as `campaign_id` on the
            other campaign endpoints.
          example: 68b1c0d4e7b91d003c45a1f2
        google_campaign_id:
          type: string
          title: Google Campaign Id
          description: >-
            The campaign's ID in Google Ads. Empty while a just-created campaign
            is still being pushed to Google.
          example: '21098765432'
        campaign_name:
          type: string
          title: Campaign Name
          description: Name shown for the campaign.
          example: Spring sale in Berlin
        campaign_type:
          type: string
          enum:
            - SMART
            - PERFORMANCE_MAX
            - SEARCH
            - DISPLAY
            - SHOPPING
            - VIDEO
            - DEMAND_GEN
            - LOCAL
            - UNKNOWN
          title: Campaign Type
          description: >-
            Campaign type. Base44 creates `PERFORMANCE_MAX`; `SMART` campaigns
            are ones it created before Google retired Smart creation on
            2026-09-23. The other values appear only on campaigns created
            outside Base44 and synced in.
          example: PERFORMANCE_MAX
        status:
          type: string
          enum:
            - ENABLED
            - PAUSED
            - REMOVED
            - UNKNOWN
          title: Status
          description: >-
            Serving state in Base44's cache. A status of `REMOVED` is a deleted
            campaign, which Google keeps for reporting.
          example: ENABLED
        daily_budget_micros:
          type: integer
          title: Daily Budget Micros
          description: >-
            Daily budget in micros of the account currency, where 1,000,000
            micros is one unit, so `15000000` is 15.00.
          example: 15000000
        landing_page:
          type: string
          title: Landing Page
          description: URL the ads send clicks to.
          example: https://example.com/spring
        geo_targets:
          items:
            type: string
          type: array
          title: Geo Targets
          description: Google Ads geo target constant IDs the campaign targets.
          example:
            - '1003854'
        phone_number:
          type: string
          title: Phone Number
          description: >-
            Campaign phone number in E.164, empty when the campaign has none.
            Both channel types store the normalized form Google holds: a call
            asset on PERFORMANCE_MAX, `smartCampaignSettings.phone_number` on
            SMART.
          example: '+493012345678'
        learning_ends_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Learning Ends At
          description: >-
            When Smart Bidding's learning period is expected to end, about 14
            days after creation, or `null` on a campaign that has not started
            learning.
          example: '2026-09-08T11:20:00Z'
        review_status:
          type: string
          title: Review Status
          description: >-
            Google's policy review status, passed through as Google reports it
            (`REVIEWED`, `UNDER_REVIEW`, …). Empty until the first sync after
            creation.
          example: REVIEWED
        serving_status:
          type: string
          title: Serving Status
          description: >-
            Google's serving status, passed through as Google reports it. Can
            still report review gating after policy review clears, so read it
            alongside `review_status`.
          example: SERVING
        primary_status:
          type: string
          title: Primary Status
          description: >-
            Google's summary of whether the campaign is serving well, passed
            through as Google reports it (`ELIGIBLE`, `LIMITED`, `NOT_SERVING`,
            …).
          example: ELIGIBLE
        primary_status_reasons:
          items:
            type: string
          type: array
          title: Primary Status Reasons
          description: >-
            Google's reasons behind `primary_status`, for example why a campaign
            is limited. Empty when there is nothing to explain.
          example:
            - CAMPAIGN_BUDGET_LIMITED
        created_date:
          type: string
          format: date-time
          title: Created Date
          description: When the campaign was created in Base44.
          example: '2026-08-25T11:20:00Z'
        updated_date:
          type: string
          format: date-time
          title: Updated Date
          description: When Base44 last changed its record of the campaign.
          example: '2026-08-25T14:05:00Z'
      type: object
      required:
        - id
        - google_campaign_id
        - campaign_name
        - campaign_type
        - status
        - daily_budget_micros
        - landing_page
        - geo_targets
        - phone_number
        - review_status
        - serving_status
        - primary_status
        - primary_status_reasons
        - created_date
        - updated_date
      title: CampaignResource
      description: The campaign fields this API commits to.
    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.
    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`.

````

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