Accept a generated Google Ads asset
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.
Authorizations
Personal API key.
Path Parameters
ID of the app whose Google Ads creative you want to generate or read.
ID of the generated asset to attach, as returned in session_asset_id by Generate Google Ads assets or List Google Ads generated assets.
Body
The generation the asset came from, as returned in session_id by Generate Google Ads assets.
"9c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f"
The Performance Max campaign to attach the asset to, as returned in id by List campaigns.
"68b1c0d4e7b91d003c45a1f2"
Response
The asset was attached to the campaign.
The outcome of attaching a generated asset to a campaign.
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.
true
The asset that was attached, echoed from the path.
"b7f3a1c8-52d4-4a0e-9b31-2c6f0d8e4a19"
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.
"SQUARE_MARKETING_IMAGE"
Whether the asset is copy (text) or a picture (image).
"image"
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.
"google"
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.
2
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.
"customers/1234567890/assets/98765432"