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

# Apply a Google Ads incentive

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

Applies one of the offers from [List Google Ads incentives](/api-reference/list-google-ads-incentives) to the app's Google Ads account.

Send the offer's `code` as `coupon_code`. Google then tracks the account's spend against the offer, and once the spend requirement is met it grants the reward as ad credit, which appears in [List Google Ads promotional credits](/api-reference/list-google-ads-promotional-credits).

An account holds one incentive at most. When it already holds one, nothing is applied and the response carries the code of the incentive it holds. Compare `applied_incentive_code` with what you expected rather than assuming a successful call applied your offer.

Applying the same offer again doesn't apply it twice. While an earlier attempt is still settling, a new call is rejected without reaching Google, so wait a few minutes and retry.

The account has to be provisioned in Google Ads, and the offer has to be quoted in the account's currency, so read the offers with `account_id` set. Applying isn't available while the workspace is on a billing hold.

<Note>Each call counts against a per-app quota, separate from the other Google Ads quotas. The default is 5 requests a minute, and the workspace's plan can raise it, so treat a rejection rather than a fixed count as the signal to back off.</Note>

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

<Warning>The response includes fields beyond the ones documented here. Don't rely on undocumented response fields, as they can change at any time.</Warning>



## OpenAPI

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


        Applies one of the offers from [List Google Ads
        incentives](/api-reference/list-google-ads-incentives) to the app's
        Google Ads account.


        Send the offer's `code` as `coupon_code`. Google then tracks the
        account's spend against the offer, and once the spend requirement is met
        it grants the reward as ad credit, which appears in [List Google Ads
        promotional
        credits](/api-reference/list-google-ads-promotional-credits).


        An account holds one incentive at most. When it already holds one,
        nothing is applied and the response carries the code of the incentive it
        holds. Compare `applied_incentive_code` with what you expected rather
        than assuming a successful call applied your offer.


        Applying the same offer again doesn't apply it twice. While an earlier
        attempt is still settling, a new call is rejected without reaching
        Google, so wait a few minutes and retry.


        The account has to be provisioned in Google Ads, and the offer has to be
        quoted in the account's currency, so read the offers with `account_id`
        set. Applying isn't available while the workspace is on a billing hold.


        <Note>Each call counts against a per-app quota, separate from the other
        Google Ads quotas. The default is 5 requests a minute, and the
        workspace's plan can raise it, so treat a rejection rather than a fixed
        count as the signal to back off.</Note>


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


        <Warning>The response includes fields beyond the ones documented here.
        Don't rely on undocumented response fields, as they can change at any
        time.</Warning>
      operationId: >-
        apply_incentive_api_apps__app_id__google_ads_accounts__account_id__incentives_apply_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
        - name: account_id
          in: path
          required: true
          schema:
            type: string
            description: >-
              ID of the Google Ads account, as returned in `id` by [Get Google
              Ads account](/api-reference/get-google-ads-account). An account
              that belongs to a different app returns a 404.
            title: Account Id
          description: >-
            ID of the Google Ads account, as returned in `id` by [Get Google Ads
            account](/api-reference/get-google-ads-account). An account that
            belongs to a different app returns a 404.
          example: 68b1c0d4e7b91d003c45a1f8
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: ApplyGoogleAdsIncentive
              type: object
              required:
                - coupon_code
              properties:
                coupon_code:
                  type: string
                  description: >-
                    The `code` of the offer to apply, as returned by [List
                    Google Ads
                    incentives](/api-reference/list-google-ads-incentives).
                  example: SELECTED:1234567:USD
            example:
              coupon_code: SELECTED:1234567:USD
      responses:
        '200':
          description: The incentive the account holds after the call.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppliedIncentiveResult'
        '400':
          description: >-
            `coupon_code` is empty, or Google Ads rejected the offer. The
            response message carries Google's reason.
        '401':
          description: Missing or invalid credentials.
        '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.
        '404':
          description: >-
            The app has no connected Google Ads account, or no account with this
            ID belongs to this app.
        '409':
          description: >-
            The offer wasn't applied. The account isn't provisioned in Google
            Ads yet, incentives aren't offered in its currency, the offer was
            quoted in a different currency, another apply on the account is
            still settling, or the workspace is on a billing hold. The request
            to Google Ads timing out after being sent also reports 409, and then
            the offer may or may not have been applied, so wait a few minutes
            and retry. The retry checks with Google first.
        '422':
          description: The body is missing, or it has no `coupon_code` string.
        '429':
          description: >-
            The app has used up its incentive-apply quota for the current
            minute, or Google Ads is rate limiting the account. Retry later.
components:
  schemas:
    AppliedIncentiveResult:
      properties:
        applied_incentive_code:
          type: string
          title: Applied Incentive Code
          description: >-
            Google's coupon code for the incentive the account now holds. When
            the account already held one, this is that incentive's code rather
            than the offer you sent.
          example: 9TQGLXDH6Q74EU
        account_id:
          type: string
          title: Account Id
          description: ID of the Google Ads account the incentive applies to.
          example: 68b1c0d4e7b91d003c45a1f8
      type: object
      required:
        - applied_incentive_code
        - account_id
      title: AppliedIncentiveResult
      description: The incentive the Google Ads account holds after the call.
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: 'Personal access token, sent as `Authorization: Bearer <token>`.'

````