Legacy fields
Legacy ad unit endpoints
The endpoints below create and link ad units.POST /advertiser-dashboard/ad-units
Create an ad unit in your advertiser account. The response is 201.string
required
The ad unit name, at most 500 characters.
string
The headline, at most 80 characters.
string
required
The description.
string
required
The landing page URL.
string
required
The ad text, at most 500 characters.
string
required
The call to action, at most 80 characters.
string
The favicon URL.
string
The image URL.
string
The brand that you advertise. Users see it. Send the product or company that you advertise. Do not send an internal account, workspace, or person label. Gravity uses it as the title of the ad when there is no
headline.array
UTM parameters as
{ "key": "...", "value": "..." } pairs.If
description, landing_page, static_ad_text, or static_cta is empty, the response is 422 with the names of the empty fields. The body rejects fields that it does not know with 422. This includes ad_text_mode and the fields that the server manages: source, status, review_status, review_reason, metadata, and generate_static_text.Request
Response 201
POST /advertiser-dashboard/campaigns/{campaign_id}/ad-units/generate
Make draft ad units from a landing page URL.string
required
The campaign ID.
string
required
The landing page URL that Gravity reads. It must be an
http or https URL. If it is not valid, the response is 400.integer
default:"3"
The number of draft ad units to make, from 1 to 5.
422.Request
Response
POST /advertiser-dashboard/campaigns/{campaign_id}/ad-units
Add ad units to a campaign. The ad units that are already linked stay linked.string
required
The campaign ID.
array
required
One or more ad unit IDs. Gravity removes duplicate IDs before it writes.
404.Request
Response
PUT /advertiser-dashboard/campaigns/{campaign_id}/ad-units
Replace the set of ad units on a campaign.string
required
The campaign ID.
array
required
The new ad unit IDs. Gravity removes duplicate IDs before it writes.
POST endpoint.Request
Response