> ## 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 account for tracking

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

Creates the app's Google Ads account without launching a campaign, so you can wire conversion tracking before launch.

The account has no campaign and nothing is charged. Calling it again returns the same account. Then call [Build Google Ads tracking fix prompt](/api-reference/build-google-ads-tracking-fix-prompt), install its `tracking_snippet` and `conversions`, and publish the app, so campaigns launched afterwards can serve straight away instead of starting paused.



## OpenAPI

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


        Creates the app's Google Ads account without launching a campaign, so
        you can wire conversion tracking before launch.


        The account has no campaign and nothing is charged. Calling it again
        returns the same account. Then call [Build Google Ads tracking fix
        prompt](/api-reference/build-google-ads-tracking-fix-prompt), install
        its `tracking_snippet` and `conversions`, and publish the app, so
        campaigns launched afterwards can serve straight away instead of
        starting paused.
      operationId: >-
        ensure_account_for_tracking_api_apps__app_id__google_ads_accounts_ensure_for_tracking_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:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/_EnsureAccountForTrackingRequest'
                - type: 'null'
              title: Payload
      responses:
        '200':
          description: The app's Google Ads account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleAdsAccountResource'
              example:
                id: 68b1c0d4e7b91d003c45a1f8
                account_name: Nordwind Furniture
                google_customer_id: '1234567890'
                status: ACTIVE
                currency_code: EUR
                timezone: Europe/Berlin
                budget_active: true
                billing_cadence: 1w
                charge_trigger_mode: cadence
                monthly_spend_cap_micros: 500000000
                auto_renew: true
                budget_window_end: '2026-09-30T23:59:59Z'
                terms_accepted_at: '2026-08-25T11:20:00Z'
                business_profile_location_id: locations/12345
                customer_grade: 1
                active_campaign_limit: 3
                total_campaign_limit: 5
                created_date: '2026-08-25T11:20:00Z'
                updated_date: '2026-08-25T14:05:00Z'
        '401':
          description: Missing or invalid credentials.
        '402':
          description: The workspace has no payment method on file.
        '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.
        '409':
          description: >-
            One of four things: the workspace or this account is on billing
            hold, the app's account exists but cannot take tracking setup
            (`extra_data.account_status` names its status, for example
            `SUSPENDED`), the app moved to another workspace, or another call is
            creating the account right now. Retry only the last one.
        '422':
          description: >-
            The body has a field other than `timezone`, or `timezone` is not a
            string.
        '429':
          description: >-
            `rate_limited`: The base limit is 300 requests in a minute from your
            account, shared across every Google Ads write that doesn't name its
            own limit. Some workspaces have a higher limit. `X-RateLimit-Limit`
            reports the enforced limit. Retry after `Retry-After` seconds. The
            `X-RateLimit-*` headers report the budget left.
          content:
            application/json:
              examples:
                rate_limited:
                  summary: rate_limited
                  value:
                    error:
                      code: rate_limited
                      message: Rate limit exceeded.
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '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:
    _EnsureAccountForTrackingRequest:
      properties:
        timezone:
          type: string
          title: Timezone
          description: >-
            IANA time zone for the new account, for example `America/New_York`.
            Google Ads reports and schedules in it. Defaults to UTC, and is used
            only when the account is created.
          default: ''
          example: America/New_York
      additionalProperties: false
      type: object
      title: _EnsureAccountForTrackingRequest
    GoogleAdsAccountResource:
      properties:
        id:
          type: string
          title: Id
          description: >-
            Base44's ID for the account. Pass it as `account_id` on the other
            account endpoints.
          example: 68b1c0d4e7b91d003c45a1f8
        account_name:
          type: string
          title: Account Name
          description: Name of the Google Ads account.
          example: Nordwind Furniture
        google_customer_id:
          type: string
          title: Google Customer Id
          description: >-
            The account's customer ID in Google Ads. Empty until Google has
            provisioned it.
          example: '1234567890'
        status:
          type: string
          title: Status
          description: >-
            State of the account. Either `ACTIVE`, `BLOCKED`, `SUSPENDED`,
            `BILLING_HOLD`, `CANCELED`, `PENDING_VERIFICATION`,
            `PENDING_BILLING_SETUP`, or `PENDING_CLOSE`. Only an `ACTIVE`
            account can create or resume campaigns.
          example: ACTIVE
        currency_code:
          type: string
          title: Currency Code
          description: Currency the account bills in, as an ISO 4217 code.
          example: EUR
        timezone:
          type: string
          title: Timezone
          description: Time zone the account reports in, as an IANA name.
          example: Europe/Berlin
        budget_active:
          type: boolean
          title: Budget Active
          description: >-
            Whether the account has a live Google Ads budget, which campaigns
            need in order to serve.
          example: true
        billing_cadence:
          type: string
          title: Billing Cadence
          description: >-
            How often the account is charged: `3d`, `1w`, `2w`, or `1m`. Only
            drives charging when `charge_trigger_mode` is `cadence`.
          example: 1w
        charge_trigger_mode:
          type: string
          title: Charge Trigger Mode
          description: >-
            What triggers a charge on this account. A mode of `cadence` charges
            on the `billing_cadence` schedule, while `threshold` is a legacy
            mode that charges when spend crosses a ladder of thresholds and
            ignores `billing_cadence` entirely.
          example: cadence
        monthly_spend_cap_micros:
          type: integer
          title: Monthly Spend Cap Micros
          description: >-
            Monthly spend cap in micros of the account currency, so `500000000`
            is 500.00. The value is `0` when no cap is set.
          example: 500000000
        auto_renew:
          type: boolean
          title: Auto Renew
          description: >-
            Whether the account's budget renews automatically at the end of its
            window.
          example: true
        budget_window_end:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Budget Window End
          description: >-
            When the current budget window ends, or `null` before a budget
            exists.
          example: '2026-09-30T23:59:59Z'
        terms_accepted_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Terms Accepted At
          description: >-
            When the Google Ads terms were accepted for this account, or `null`
            until they are.
          example: '2026-08-25T11:20:00Z'
        business_profile_location_id:
          type: string
          title: Business Profile Location Id
          description: >-
            Google Business Profile location linked to the account, as
            `locations/<id>`. Empty when none is linked.
          example: locations/12345
        customer_grade:
          type: integer
          title: Customer Grade
          description: >-
            How far the workspace has earned higher limits by paying on time.
            `0` until 3 invoices in a row are paid with no decline, then `1`,
            rising by one per further clean invoice. It never goes down; it
            reads `0` only while an account in the workspace is on hold or
            blocked.
          default: 0
          example: 1
        active_campaign_limit:
          type: integer
          title: Active Campaign Limit
          description: >-
            How many of the account's campaigns can be enabled at once. `2`,
            plus one per `customer_grade`, up to `5`.
          default: 2
          example: 3
        total_campaign_limit:
          type: integer
          title: Total Campaign Limit
          description: >-
            How many campaigns the account can hold in total, enabled or paused.
            Archived campaigns don't count.
          default: 5
          example: 5
        created_date:
          type: string
          format: date-time
          title: Created Date
          description: When the account 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 account.
          example: '2026-08-25T14:05:00Z'
      type: object
      required:
        - id
        - account_name
        - google_customer_id
        - status
        - currency_code
        - timezone
        - budget_active
        - billing_cadence
        - charge_trigger_mode
        - monthly_spend_cap_micros
        - auto_renew
        - business_profile_location_id
        - created_date
        - updated_date
      title: GoogleAdsAccountResource
      description: The account fields this API commits to.
    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.
    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.