curl --request GET \
--url http://localhost:8000/api/v1/campaigns/drafts/active \
--header 'Authorization: Bearer <token>'{
"id": 123,
"name": "<string>",
"google_ads_customer_id": 123,
"date_added": "2023-11-07T05:31:56Z",
"date_updated": "2023-11-07T05:31:56Z",
"market_analysis_id": 123,
"campaign_name": "<string>",
"website_url": "<string>",
"daily_budget_micros": 123,
"bidding_strategy": {
"type": "MAXIMIZE_CONVERSIONS",
"target_cpa_micros": 123,
"target_roas": 1,
"max_cpc_bid_ceiling_micros": 123
},
"default_match_type": "PHRASE",
"language_ids": [
123
],
"location_targets": [
{
"geo_target_constant_id": 123,
"target_type": "INCLUDE"
}
],
"network_settings": {
"target_google_search": true,
"target_search_network": false,
"target_content_network": false
},
"ad_schedule": {
"mode": "ALL_TIME",
"schedule_entries": [
{
"day_of_week": "MONDAY",
"start_hour": 11,
"end_hour": 12,
"start_minute": 0,
"end_minute": 0
}
]
},
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"conversion_goals": [
{
"goal_type": "CAMPAIGN_SPECIFIC",
"conversion_action_id": 1,
"category": "PURCHASE"
}
],
"extensions": {
"sitelinks": [
{
"link_text": "<string>",
"final_url": "<string>",
"description_1": "<string>",
"description_2": "<string>",
"final_mobile_url": "<string>"
}
],
"callouts": [
{
"callout_text": "<string>"
}
],
"phone": {
"phone_number": "<string>",
"country_code": "<string>"
},
"structured_snippets": [
{
"header": "AMENITIES",
"values": [
"<string>"
]
}
]
},
"ad_groups_task_id": "<string>",
"ad_groups_generation_status": "completed",
"ad_groups_generation_error": "<string>",
"extensions_task_id": "<string>",
"extensions_generation_status": "not_started",
"extensions_generation_error": "<string>",
"is_published": false,
"published_at": "2023-11-07T05:31:56Z",
"published_campaign_id": 123,
"all_rsas_generated": false,
"ad_groups": [
{
"id": 123,
"name": "<string>",
"cpc_bid_micros": 25000000000,
"keywords": [
{
"id": 123,
"text": "<string>",
"match_type": "EXACT",
"cpc_bid_micros": 25000000000,
"final_url": "<string>",
"source_market_analysis_keyword_id": 123
}
],
"rsas": [
{
"id": 123,
"ad_group_id": 123,
"headlines": [
{
"text": "<string>",
"pinned_field": "HEADLINE_1",
"reason": "<string>"
}
],
"descriptions": [
{
"text": "<string>",
"pinned_field": "HEADLINE_1",
"reason": "<string>"
}
],
"final_url": "<string>",
"final_mobile_url": "<string>",
"display_path_1": "<string>",
"display_path_2": "<string>",
"tracking_url_template": "<string>",
"generation_status": "pending",
"generation_task_id": "<string>",
"generation_error": "<string>"
}
]
}
]
}Get the most recent active draft for a market analysis.
Returns the most recently updated draft regardless of publish status. Useful for resuming work on a campaign without knowing the draft ID.
curl --request GET \
--url http://localhost:8000/api/v1/campaigns/drafts/active \
--header 'Authorization: Bearer <token>'{
"id": 123,
"name": "<string>",
"google_ads_customer_id": 123,
"date_added": "2023-11-07T05:31:56Z",
"date_updated": "2023-11-07T05:31:56Z",
"market_analysis_id": 123,
"campaign_name": "<string>",
"website_url": "<string>",
"daily_budget_micros": 123,
"bidding_strategy": {
"type": "MAXIMIZE_CONVERSIONS",
"target_cpa_micros": 123,
"target_roas": 1,
"max_cpc_bid_ceiling_micros": 123
},
"default_match_type": "PHRASE",
"language_ids": [
123
],
"location_targets": [
{
"geo_target_constant_id": 123,
"target_type": "INCLUDE"
}
],
"network_settings": {
"target_google_search": true,
"target_search_network": false,
"target_content_network": false
},
"ad_schedule": {
"mode": "ALL_TIME",
"schedule_entries": [
{
"day_of_week": "MONDAY",
"start_hour": 11,
"end_hour": 12,
"start_minute": 0,
"end_minute": 0
}
]
},
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"conversion_goals": [
{
"goal_type": "CAMPAIGN_SPECIFIC",
"conversion_action_id": 1,
"category": "PURCHASE"
}
],
"extensions": {
"sitelinks": [
{
"link_text": "<string>",
"final_url": "<string>",
"description_1": "<string>",
"description_2": "<string>",
"final_mobile_url": "<string>"
}
],
"callouts": [
{
"callout_text": "<string>"
}
],
"phone": {
"phone_number": "<string>",
"country_code": "<string>"
},
"structured_snippets": [
{
"header": "AMENITIES",
"values": [
"<string>"
]
}
]
},
"ad_groups_task_id": "<string>",
"ad_groups_generation_status": "completed",
"ad_groups_generation_error": "<string>",
"extensions_task_id": "<string>",
"extensions_generation_status": "not_started",
"extensions_generation_error": "<string>",
"is_published": false,
"published_at": "2023-11-07T05:31:56Z",
"published_campaign_id": 123,
"all_rsas_generated": false,
"ad_groups": [
{
"id": 123,
"name": "<string>",
"cpc_bid_micros": 25000000000,
"keywords": [
{
"id": 123,
"text": "<string>",
"match_type": "EXACT",
"cpc_bid_micros": 25000000000,
"final_url": "<string>",
"source_market_analysis_keyword_id": 123
}
],
"rsas": [
{
"id": 123,
"ad_group_id": 123,
"headlines": [
{
"text": "<string>",
"pinned_field": "HEADLINE_1",
"reason": "<string>"
}
],
"descriptions": [
{
"text": "<string>",
"pinned_field": "HEADLINE_1",
"reason": "<string>"
}
],
"final_url": "<string>",
"final_mobile_url": "<string>",
"display_path_1": "<string>",
"display_path_2": "<string>",
"tracking_url_template": "<string>",
"generation_status": "pending",
"generation_task_id": "<string>",
"generation_error": "<string>"
}
]
}
]
}The access token received from the authorization server in the OAuth 2.0 flow.
Market analysis ID to find active draft for
Successful Response
Campaign draft schema - full representation.
1 - 2083Bidding strategy configuration.
Show child attributes
The keyword match types.
EXACT, PHRASE, BROAD, BROAD_MODIFIER, NEGATIVE Show child attributes
Network settings for campaign.
Show child attributes
Ad schedule configuration.
Show child attributes
Show child attributes
All extensions configuration.
Show child attributes
Status of background task generation (ad groups, RSAs).
not_started, pending, in_progress, completed, failed Status of background task generation (ad groups, RSAs).
not_started, pending, in_progress, completed, failed Show child attributes