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

# Accept a generated Google Ads asset

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

Puts one generated asset onto a live Performance Max campaign.

This is the step that reaches Google Ads. Up to here creative is only a preview, and this creates the asset on the app's own Google Ads account and links it to **every** asset group the campaign has, with the slot the asset was generated for. After this Google Ads is the source of truth for it.

You can accept an asset long after the generation that produced it. Base44 looks the asset up in the app's durable library first and only falls back to the live session, so an asset you read from `library` works even though its preview has expired. `session_id` is still required, because it is what the fallback needs.

Performance Max only. Other campaign types have no asset groups, so they are rejected with a 422.

A 409 covers four different situations and the message is what tells them apart, so read it rather than retrying blindly. Waiting is right for an image that is still processing, syncing is right for a campaign that has not reached Google Ads, and regenerating is right for an asset that is no longer usable.

<Warning>Accepting the same picture twice creates a second asset on the campaign. Google has no content check for images, so a retried or repeated accept leaves you with duplicate creative that you have to remove in Google Ads. Copy is safe to repeat, because Google matches identical text and reuses the existing asset. Treat an image accept as a one-shot and read [List Google Ads generated assets](/api-reference/list-google-ads-generated-assets) to check `status` before retrying.</Warning>

<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. 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/assets/{session_asset_id}/accept
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - ApiKeyAuth: []
paths:
  /api/apps/{app_id}/google-ads/assets/{session_asset_id}/accept:
    post:
      summary: Accept a generated Google Ads asset
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Puts one generated asset onto a live Performance Max campaign.


        This is the step that reaches Google Ads. Up to here creative is only a
        preview, and this creates the asset on the app's own Google Ads account
        and links it to **every** asset group the campaign has, with the slot
        the asset was generated for. After this Google Ads is the source of
        truth for it.


        You can accept an asset long after the generation that produced it.
        Base44 looks the asset up in the app's durable library first and only
        falls back to the live session, so an asset you read from `library`
        works even though its preview has expired. `session_id` is still
        required, because it is what the fallback needs.


        Performance Max only. Other campaign types have no asset groups, so they
        are rejected with a 422.


        A 409 covers four different situations and the message is what tells
        them apart, so read it rather than retrying blindly. Waiting is right
        for an image that is still processing, syncing is right for a campaign
        that has not reached Google Ads, and regenerating is right for an asset
        that is no longer usable.


        <Warning>Accepting the same picture twice creates a second asset on the
        campaign. Google has no content check for images, so a retried or
        repeated accept leaves you with duplicate creative that you have to
        remove in Google Ads. Copy is safe to repeat, because Google matches
        identical text and reuses the existing asset. Treat an image accept as a
        one-shot and read [List Google Ads generated
        assets](/api-reference/list-google-ads-generated-assets) to check
        `status` before retrying.</Warning>


        <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. Send only the fields documented here. Other request fields are not
        supported and their behavior can change.</Warning>
      operationId: >-
        accept_generated_asset_api_apps__app_id__google_ads_assets__session_asset_id__accept_post
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: >-
              ID of the app whose Google Ads creative you want to generate or
              read.
            title: App Id
          description: >-
            ID of the app whose Google Ads creative you want to generate or
            read.
          example: 6820f3a4e7b91d003c45a1f2
        - name: session_asset_id
          in: path
          required: true
          schema:
            type: string
            description: >-
              ID of the generated asset to attach, as returned in
              `session_asset_id` by [Generate Google Ads
              assets](/api-reference/generate-google-ads-assets) or [List Google
              Ads generated
              assets](/api-reference/list-google-ads-generated-assets).
            title: Session Asset Id
          description: >-
            ID of the generated asset to attach, as returned in
            `session_asset_id` by [Generate Google Ads
            assets](/api-reference/generate-google-ads-assets) or [List Google
            Ads generated
            assets](/api-reference/list-google-ads-generated-assets).
          example: b7f3a1c8-52d4-4a0e-9b31-2c6f0d8e4a19
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: AcceptGeneratedAsset
              type: object
              required:
                - session_id
                - campaign_id
              properties:
                session_id:
                  type: string
                  description: >-
                    The generation the asset came from, as returned in
                    `session_id` by [Generate Google Ads
                    assets](/api-reference/generate-google-ads-assets).
                  example: 9c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f
                campaign_id:
                  type: string
                  description: >-
                    The Performance Max campaign to attach the asset to, as
                    returned in `id` by [List
                    campaigns](/api-reference/list-google-ads-campaigns).
                  example: 68b1c0d4e7b91d003c45a1f2
            example:
              session_id: 9c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f
              campaign_id: 68b1c0d4e7b91d003c45a1f2
      responses:
        '200':
          description: The asset was attached to the campaign.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcceptAssetResult'
        '400':
          description: >-
            The asset could not be used as it stands: Base44 could not reload
            the generated image, the generated copy is empty, or Google Ads
            rejected the asset, for example copy that breaks its policies.
            Generate a replacement rather than retrying this one. A Google
            rejection carries its reason in the message.
        '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 there is no campaign
            with this ID on it. It is also returned when there is no generated
            asset with this `session_asset_id`.
        '409':
          description: >-
            The accept cannot proceed yet, and the message says which of four
            reasons applies: the generated image is still processing, so wait
            and retry; the campaign has not reached Google Ads yet or has no
            asset groups, so sync it and retry; the asset is no longer usable,
            so generate a replacement; or the request to Google Ads timed out
            after being sent, in which case the asset may or may not have been
            attached and a retry can duplicate it. Read the message before
            choosing what to do.
        '422':
          description: >-
            The campaign is not a Performance Max campaign. Only Performance Max
            campaigns have the asset groups these endpoints work on.
        '429':
          description: Google Ads is rate limiting the account. Retry later.
components:
  schemas:
    AcceptAssetResult:
      properties:
        accepted:
          type: boolean
          title: Accepted
          description: >-
            Always `true` on a success, so it carries no information beyond the
            status code. Read `asset_group_count` to see how far the attach
            reached.
          example: true
        session_asset_id:
          type: string
          title: Session Asset Id
          description: The asset that was attached, echoed from the path.
          example: b7f3a1c8-52d4-4a0e-9b31-2c6f0d8e4a19
        asset_field_type:
          type: string
          title: Asset Field Type
          description: >-
            Which slot on the ad this asset fills. Text assets are `HEADLINE`,
            `LONG_HEADLINE` or `DESCRIPTION`. Image assets are
            `MARKETING_IMAGE`, `SQUARE_MARKETING_IMAGE`,
            `PORTRAIT_MARKETING_IMAGE` or `TALL_PORTRAIT_MARKETING_IMAGE`.
          example: SQUARE_MARKETING_IMAGE
        kind:
          type: string
          title: Kind
          description: Whether the asset is copy (`text`) or a picture (`image`).
          example: image
        source:
          type: string
          title: Source
          description: >-
            Which engine wrote it. The value is `google` for Google's own asset
            generation and `inhouse` for the Base44 model that covers languages
            Google does not generate for, and that stands in when Google's call
            fails.
          example: google
        asset_group_count:
          type: integer
          title: Asset Group Count
          description: >-
            How many of the campaign's asset groups the asset was linked to. The
            asset goes on every asset group the campaign has, so this is that
            count.
          example: 2
        resource_name:
          type: string
          title: Resource Name
          description: >-
            Google Ads resource name of the asset that now holds this creative.
            Empty when Google's response carried no resource name, which does
            not mean the attach failed.
          example: customers/1234567890/assets/98765432
      type: object
      required:
        - accepted
        - session_asset_id
        - asset_field_type
        - kind
        - source
        - asset_group_count
        - resource_name
      title: AcceptAssetResult
      description: The outcome of attaching a generated asset to a campaign.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key
      description: Personal API key.

````