Campaign data model

Updated:

View field support, webhooks, and list parameters for each integration on the Supported Integrations page.

FieldTypeRequiredDescription
idstringNo
created_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
updated_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
namestringNoThe campaign's name
organization_idstringNoThe ID of the ad account the campaign belongs to (an AdsOrganization ID)
statusenumNoValues: UNSPECIFIED, ACTIVE, PAUSED, ARCHIVED, DRAFT, SCHEDULED_FOR_DELETION, PROCESSING, PROCESSING_FAILED
effective_statusenumNoread-only; controlled by the provider (whether/why the campaign can serve), unlike the user-managed status Values: UNSPECIFIED, SERVING, LIMITED, LEARNING, PAUSED, PENDING, ENDED, MISCONFIGURED, NOT_ELIGIBLE, ARCHIVED, REMOVED
start_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
end_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
budget_amountnumberNo
budget_periodenumNoValues: DAILY, MONTHLY, TOTAL, LIFETIME
budget_unitenumNoValues: UNSPECIFIED, CURRENCY, IMPRESSIONS
total_spend_amountnumberNo
targetingobjectNo
targeting.geographicAdsCampaign_targeting_geographicNo
targeting.geographic.countriesTargetRef[]No
targeting.geographic.countries[].idstringNo
targeting.geographic.countries[].namestringNo
targeting.geographic.regionsTargetRef[]No
targeting.geographic.regions[].idstringNo
targeting.geographic.regions[].namestringNo
targeting.geographic.citiesCityTarget[]No
targeting.geographic.cities[].idstringYes
targeting.geographic.cities[].namestringNo
targeting.geographic.cities[].radiusnumberNo
targeting.geographic.cities[].radius_unitenumNoValues: MILES, KILOMETERS
targeting.geographic.postal_codesTargetRef[]No
targeting.geographic.postal_codes[].idstringNo
targeting.geographic.postal_codes[].namestringNo
targeting.geographic.us_dmasTargetRef[]No
targeting.geographic.us_dmas[].idstringNo
targeting.geographic.us_dmas[].namestringNo
targeting.geographic.excluded_countriesTargetRef[]No
targeting.geographic.excluded_countries[].idstringNo
targeting.geographic.excluded_countries[].namestringNo
targeting.geographic.excluded_regionsTargetRef[]No
targeting.geographic.excluded_regions[].idstringNo
targeting.geographic.excluded_regions[].namestringNo
targeting.geographic.excluded_citiesCityTarget[]No
targeting.geographic.excluded_cities[].idstringYes
targeting.geographic.excluded_cities[].namestringNo
targeting.geographic.excluded_cities[].radiusnumberNo
targeting.geographic.excluded_cities[].radius_unitenumNoValues: MILES, KILOMETERS
targeting.geographic.excluded_postal_codesTargetRef[]No
targeting.geographic.excluded_postal_codes[].idstringNo
targeting.geographic.excluded_postal_codes[].namestringNo
targeting.geographic.excluded_us_dmasTargetRef[]No
targeting.geographic.excluded_us_dmas[].idstringNo
targeting.geographic.excluded_us_dmas[].namestringNo
targeting.geographic.location_typesenum[]NoValues: HOME, RECENT, TRAVEL
targeting.geographic.presence_typeenumNoValues: PRESENCE, PRESENCE_OR_INTEREST
targeting.demographicAdsCampaign_targeting_demographicNoDemographic targeting (Meta: age_min, age_max, genders)
targeting.demographic.age_minnumberNo
targeting.demographic.age_maxnumberNo
targeting.demographic.malebooleanNo
targeting.demographic.femalebooleanNo
targeting.audienceAdsCampaign_targeting_audienceNo
targeting.audience.custom_audiencesTargetRef[]No
targeting.audience.custom_audiences[].idstringNo
targeting.audience.custom_audiences[].namestringNo
targeting.audience.excluded_custom_audiencesTargetRef[]No
targeting.audience.excluded_custom_audiences[].idstringNo
targeting.audience.excluded_custom_audiences[].namestringNo
targeting.audience.lookalike_audiencesLookalikeAudience[]No
targeting.audience.lookalike_audiences[].idstringYes
targeting.audience.lookalike_audiences[].namestringNo
targeting.audience.lookalike_audiences[].similaritynumberNo
targeting.audience.lookalike_audiences[].source_audience_idstringNo
targeting.audience.interestsTargetRef[]No
targeting.audience.interests[].idstringNo
targeting.audience.interests[].namestringNo
targeting.audience.excluded_interestsTargetRef[]No
targeting.audience.excluded_interests[].idstringNo
targeting.audience.excluded_interests[].namestringNo
targeting.audience.behaviorsTargetRef[]No
targeting.audience.behaviors[].idstringNo
targeting.audience.behaviors[].namestringNo
targeting.audience.excluded_behaviorsTargetRef[]No
targeting.audience.excluded_behaviors[].idstringNo
targeting.audience.excluded_behaviors[].namestringNo
targeting.audience.combination_specAudienceCombination[]No
targeting.audience.combination_spec[].interestsTargetRef[]No
targeting.audience.combination_spec[].interests[].idstringNo
targeting.audience.combination_spec[].interests[].namestringNo
targeting.audience.combination_spec[].behaviorsTargetRef[]No
targeting.audience.combination_spec[].behaviors[].idstringNo
targeting.audience.combination_spec[].behaviors[].namestringNo
targeting.audience.combination_spec[].referencesTargetRef[]No
targeting.audience.combination_spec[].references[].idstringNo
targeting.audience.combination_spec[].references[].namestringNo
targeting.audience.combination_spec[].life_eventsTargetRef[]No
targeting.audience.combination_spec[].life_events[].idstringNo
targeting.audience.combination_spec[].life_events[].namestringNo
targeting.placementAdsCampaign_targeting_placementNo
targeting.placement.platformsstring[]No
targeting.placement.facebook_positionsstring[]No
targeting.placement.instagram_positionsstring[]No
targeting.placement.messenger_positionsstring[]No
targeting.placement.audience_network_positionsstring[]No
targeting.deviceAdsCampaign_targeting_deviceNo
targeting.device.typesTargetRef[]No
targeting.device.types[].idstringNo
targeting.device.types[].namestringNo
targeting.device.user_deviceTargetRef[]No
targeting.device.user_device[].idstringNo
targeting.device.user_device[].namestringNo
targeting.device.user_osTargetRef[]No
targeting.device.user_os[].idstringNo
targeting.device.user_os[].namestringNo
targeting.device.carriersTargetRef[]No
targeting.device.carriers[].idstringNo
targeting.device.carriers[].namestringNo
targeting.languageTargetRef[]No
targeting.language[].idstringNo
targeting.language[].namestringNo
targeting.contentAdsCampaign_targeting_contentNo
targeting.content.keywordsAdsKeyword[]No
targeting.content.keywords[].textstringYes
targeting.content.keywords[].match_typeenumNoValues: BROAD, PHRASE, EXACT
targeting.content.excluded_keywordsAdsKeyword[]No
targeting.content.excluded_keywords[].textstringYes
targeting.content.excluded_keywords[].match_typeenumNoValues: BROAD, PHRASE, EXACT
targeting.content.topicsTargetRef[]No
targeting.content.topics[].idstringNo
targeting.content.topics[].namestringNo
targeting.content.excluded_topicsTargetRef[]No
targeting.content.excluded_topics[].idstringNo
targeting.content.excluded_topics[].namestringNo
targeting.content.urlsstring[]No
targeting.content.excluded_urlsstring[]No
targeting.content.videoAdsCampaign_targeting_content_videoNo
targeting.content.video.youtube_videosstring[]No
targeting.content.video.excluded_youtube_videosstring[]No
targeting.content.video.youtube_channelsstring[]No
targeting.content.video.excluded_youtube_channelsstring[]No
targeting.content.video.positionsenum[]NoValues: PREROLL, MIDROLL, POSTROLL, INSTREAM, OUTSTREAM
targeting.content.video.player_sizesenum[]NoValues: SMALL, LARGE, HD
targeting.content.video.durationsenum[]NoValues: SHORT, MEDIUM, LONG
targeting.brand_safetyAdsCampaign_targeting_brand_safetyNoBrand safety (Meta: excluded_publisher_categories, etc.; Google
targeting.brand_safety.excluded_publisher_categoriesstring[]No
targeting.brand_safety.excluded_content_labelsstring[]NoGoogle Ads ContentLabelType
targeting.brand_safety.brand_safety_content_filter_levelsstring[]No
targeting.brand_safety.publisher_visibility_categoriesenum[]NoValues: limited, standard, expanded
targeting.brand_safety.block_list_idsstring[]No
targeting.scheduleAdSchedule[]No
targeting.schedule[].day_of_weekenumYesValues: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY
targeting.schedule[].start_hournumberYes0-23
targeting.schedule[].start_minutenumberNo0, 15, 30, 45
targeting.schedule[].end_hournumberYes0-24 (24 = end of day)
targeting.schedule[].end_minutenumberNo0, 15, 30, 45
targeting.schedule[].bid_modifiernumberNo0.1-10.0
targeting.optimizationAdsCampaign_targeting_optimizationNoOptimization (Meta: targeting_automation; Google: observation vs targeting mode)
targeting.optimization.modeenumNoGoogle: bid_only falsetrue Values: TARGETING, OBSERVATION
targeting.optimization.advantage_audiencebooleanNo
targeting.optimization.advantage_placementsbooleanNo
targeting.optimization.targeting_optimization_expansion_allbooleanNo
targeting.inventoryAdsCampaign_targeting_inventoryNoPublisher inventory (ad units, placements) to include / exclude
targeting.inventory.inventory_idsstring[]No
targeting.inventory.excluded_inventory_idsstring[]No
targeting.customCustomTargeting[]NoKey-value targeting; clauses are ANDed
targeting.custom[].keystringYes
targeting.custom[].valuesstring[]Yes
targeting.custom[].is_excludedbooleanNo
targeting.supplyAdsCampaign_targeting_supplyNoBuy-side inventory: exchanges, deals, deal groups and seller authorization (DSPs)
targeting.supply.exchangesTargetRef[]NoPublic exchanges to buy on (ads_target type EXCHANGE)
targeting.supply.exchanges[].idstringNo
targeting.supply.exchanges[].namestringNo
targeting.supply.dealsTargetRef[]NoDeals / inventory packages (ads_target type DEAL)
targeting.supply.deals[].idstringNo
targeting.supply.deals[].namestringNo
targeting.supply.deal_groupsTargetRef[]NoGroups of deals (ads_target type DEAL_GROUP)
targeting.supply.deal_groups[].idstringNo
targeting.supply.deal_groups[].namestringNo
targeting.supply.authorized_seller_statusenumNoads.txt seller authorization to buy from Values: AUTHORIZED_DIRECT_ONLY, AUTHORIZED_DIRECT_AND_RESELLERS, AUTHORIZED_AND_NON_PARTICIPATING
goalenumNoValues: UNSPECIFIED, BRAND_AWARENESS, ENGAGEMENT, REACH, WEBSITE_TRAFFIC, LEADS, SALES, APP_PROMOTION
planned_spend_amountnumberNo
frequency_capobjectNo
frequency_cap.is_unlimitedbooleanNo
frequency_cap.time_unitenumNoValues: UNSPECIFIED, LIFETIME, MONTHS, WEEKS, DAYS, HOURS, MINUTES
frequency_cap.time_unit_countnumberNo
frequency_cap.max_impressionsnumberNo
frequency_cap.max_viewsnumberNo
advertising_channel_typeenumNoValues: TEXT, IMAGE, VIDEO, RESPONSIVE, SHOPPING, APP, CALL, CAROUSEL, SOCIAL, DISPLAY, SEARCH, AUDIO, YOUTUBE, NATIVE, CTV, DOOH, PERFORMANCE_MAX
campaign_budget_identifierstringNoResource name for existing/shared budget (Google)
currencystringNo
categorystringNoHousing, employment, credit, NONE (Meta)
has_eu_political_adsbooleanNo
labelsstring[]No
kpiobjectNo
kpi.typeenumNoValues: UNSPECIFIED, CPM, CPC, CPA, CTR, VIEWABILITY, CPIAVC, CPE, CPV, CLICK_CVR, IMPRESSION_CVR, VCPM, VTR, AUDIO_COMPLETION_RATE, VIDEO_COMPLETION_RATE, CPCL, CPCV, TOS10, MAXIMIZE_PACING, CUSTOM_IMPRESSION_VALUE_OVER_COST, OTHER
kpi.amountnumberNo
kpi.percentagenumberNo
kpi.string_valuestringNo
kpi.algorithm_idstringNo
metadataAdsMetadata[]No
metadata[].idstringNo
metadata[].slugstringNo
metadata[].valueobjectNo
metadata[].namespacestringNo
metadata[].formatenumNoValues: TEXT, NUMBER, DATE, BOOLEAN, FILE, TEXTAREA, SINGLE_SELECT, MULTIPLE_SELECT, MEASUREMENT, PRICE, YES_NO, CURRENCY, URL
metadata[].extra_dataobjectNo

TypeScript

TypeScript
export type AdsCampaign = {
	id?: string;
	created_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	updated_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	name?: string; // The campaign's name
	organization_id?: string; // The ID of the ad account the campaign belongs to (an AdsOrganization ID)
	status?: 'UNSPECIFIED' | 'ACTIVE' | 'PAUSED' | 'ARCHIVED' | 'DRAFT' | 'SCHEDULED_FOR_DELETION' | 'PROCESSING' | 'PROCESSING_FAILED';
	effective_status?: 'UNSPECIFIED' | 'SERVING' | 'LIMITED' | 'LEARNING' | 'PAUSED' | 'PENDING' | 'ENDED' | 'MISCONFIGURED' | 'NOT_ELIGIBLE' | 'ARCHIVED' | 'REMOVED'; // read-only; controlled by the provider (whether/why the campaign can serve), unlike the user-managed status
	start_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	end_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	budget_amount?: number;
	budget_period?: 'DAILY' | 'MONTHLY' | 'TOTAL' | 'LIFETIME';
	budget_unit?: 'UNSPECIFIED' | 'CURRENCY' | 'IMPRESSIONS';
	total_spend_amount?: number;
	targeting?: {
		geographic?: any; 
		demographic?: any; // Demographic targeting (Meta: age_min, age_max, genders) 
		audience?: any; 
		placement?: any; 
		device?: any; 
		language?: []; 
		content?: any; 
		brand_safety?: any; // Brand safety (Meta: excluded_publisher_categories, etc.; Google 
		schedule?: []; 
		optimization?: any; // Optimization (Meta: targeting_automation; Google: observation vs targeting mode) 
		inventory?: any; // Publisher inventory (ad units, placements) to include / exclude 
		custom?: []; // Key-value targeting; clauses are ANDed 
		supply?: any; // Buy-side inventory: exchanges, deals, deal groups and seller authorization (DSPs) 
	};
	goal?: 'UNSPECIFIED' | 'BRAND_AWARENESS' | 'ENGAGEMENT' | 'REACH' | 'WEBSITE_TRAFFIC' | 'LEADS' | 'SALES' | 'APP_PROMOTION';
	planned_spend_amount?: number;
	frequency_cap?: {
		is_unlimited?: boolean; 
		time_unit?: 'UNSPECIFIED' | 'LIFETIME' | 'MONTHS' | 'WEEKS' | 'DAYS' | 'HOURS' | 'MINUTES'; 
		time_unit_count?: number; 
		max_impressions?: number; 
		max_views?: number; 
	};
	advertising_channel_type?: 'TEXT' | 'IMAGE' | 'VIDEO' | 'RESPONSIVE' | 'SHOPPING' | 'APP' | 'CALL' | 'CAROUSEL' | 'SOCIAL' | 'DISPLAY' | 'SEARCH' | 'AUDIO' | 'YOUTUBE' | 'NATIVE' | 'CTV' | 'DOOH' | 'PERFORMANCE_MAX';
	campaign_budget_identifier?: string; // Resource name for existing/shared budget (Google)
	currency?: string;
	category?: string; // Housing, employment, credit, NONE (Meta)
	has_eu_political_ads?: boolean;
	labels?: string[];
	kpi?: {
		type?: 'UNSPECIFIED' | 'CPM' | 'CPC' | 'CPA' | 'CTR' | 'VIEWABILITY' | 'CPIAVC' | 'CPE' | 'CPV' | 'CLICK_CVR' | 'IMPRESSION_CVR' | 'VCPM' | 'VTR' | 'AUDIO_COMPLETION_RATE' | 'VIDEO_COMPLETION_RATE' | 'CPCL' | 'CPCV' | 'TOS10' | 'MAXIMIZE_PACING' | 'CUSTOM_IMPRESSION_VALUE_OVER_COST' | 'OTHER'; 
		amount?: number; 
		percentage?: number; 
		string_value?: string; 
		algorithm_id?: string; 
	};
	metadata?: [];
	raw?: any;
} 

Zod

Zod
import { z } from 'zod';

export const ZodAdsCampaign = z.object({
	id: z.string().optional(),
	created_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	updated_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	name: z.string().optional().describe("The campaign's name"),
	organization_id: z.string().optional().describe("The ID of the ad account the campaign belongs to (an AdsOrganization ID)"),
	status: z.enum("UNSPECIFIED", "ACTIVE", "PAUSED", "ARCHIVED", "DRAFT", "SCHEDULED_FOR_DELETION", "PROCESSING", "PROCESSING_FAILED").optional(),
	effective_status: z.enum("UNSPECIFIED", "SERVING", "LIMITED", "LEARNING", "PAUSED", "PENDING", "ENDED", "MISCONFIGURED", "NOT_ELIGIBLE", "ARCHIVED", "REMOVED").optional().describe("read-only; controlled by the provider (whether/why the campaign can serve), unlike the user-managed status"),
	start_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	end_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	budget_amount: z.number().optional(),
	budget_period: z.enum("DAILY", "MONTHLY", "TOTAL", "LIFETIME").optional(),
	budget_unit: z.enum("UNSPECIFIED", "CURRENCY", "IMPRESSIONS").optional(),
	total_spend_amount: z.number().optional(),
	targeting: z.object({
			geographic: z.unknown().optional(),
			demographic: z.unknown().optional().describe("Demographic targeting (Meta: age_min, age_max, genders)"),
			audience: z.unknown().optional(),
			placement: z.unknown().optional(),
			device: z.unknown().optional(),
			language: z.array().optional(),
			content: z.unknown().optional(),
			brand_safety: z.unknown().optional().describe("Brand safety (Meta: excluded_publisher_categories, etc.; Google"),
			schedule: z.array().optional(),
			optimization: z.unknown().optional().describe("Optimization (Meta: targeting_automation; Google: observation vs targeting mode)"),
			inventory: z.unknown().optional().describe("Publisher inventory (ad units, placements) to include / exclude"),
			custom: z.array().optional().describe("Key-value targeting; clauses are ANDed"),
			supply: z.unknown().optional().describe("Buy-side inventory: exchanges, deals, deal groups and seller authorization (DSPs)")
}).optional(),
	goal: z.enum("UNSPECIFIED", "BRAND_AWARENESS", "ENGAGEMENT", "REACH", "WEBSITE_TRAFFIC", "LEADS", "SALES", "APP_PROMOTION").optional(),
	planned_spend_amount: z.number().optional(),
	frequency_cap: z.object({
			is_unlimited: z.boolean().optional(),
			time_unit: z.enum("UNSPECIFIED", "LIFETIME", "MONTHS", "WEEKS", "DAYS", "HOURS", "MINUTES").optional(),
			time_unit_count: z.number().optional(),
			max_impressions: z.number().optional(),
			max_views: z.number().optional()
}).optional(),
	advertising_channel_type: z.enum("TEXT", "IMAGE", "VIDEO", "RESPONSIVE", "SHOPPING", "APP", "CALL", "CAROUSEL", "SOCIAL", "DISPLAY", "SEARCH", "AUDIO", "YOUTUBE", "NATIVE", "CTV", "DOOH", "PERFORMANCE_MAX").optional(),
	campaign_budget_identifier: z.string().optional().describe("Resource name for existing/shared budget (Google)"),
	currency: z.string().optional(),
	category: z.string().optional().describe("Housing, employment, credit, NONE (Meta)"),
	has_eu_political_ads: z.boolean().optional(),
	labels: z.array().optional(),
	kpi: z.object({
			type: z.enum("UNSPECIFIED", "CPM", "CPC", "CPA", "CTR", "VIEWABILITY", "CPIAVC", "CPE", "CPV", "CLICK_CVR", "IMPRESSION_CVR", "VCPM", "VTR", "AUDIO_COMPLETION_RATE", "VIDEO_COMPLETION_RATE", "CPCL", "CPCV", "TOS10", "MAXIMIZE_PACING", "CUSTOM_IMPRESSION_VALUE_OVER_COST", "OTHER").optional(),
			amount: z.number().optional(),
			percentage: z.number().optional(),
			string_value: z.string().optional(),
			algorithm_id: z.string().optional()
}).optional(),
	metadata: z.array().optional(),

});

Python

Python
import dataclasses

@dataclasses.dataclass
class AdsCampaignStatus(str, Enum):
	UNSPECIFIED = 'UNSPECIFIED'
	ACTIVE = 'ACTIVE'
	PAUSED = 'PAUSED'
	ARCHIVED = 'ARCHIVED'
	DRAFT = 'DRAFT'
	SCHEDULED_FOR_DELETION = 'SCHEDULED_FOR_DELETION'
	PROCESSING = 'PROCESSING'
	PROCESSING_FAILED = 'PROCESSING_FAILED'

@dataclasses.dataclass
class AdsCampaignEffective_status(str, Enum):
	UNSPECIFIED = 'UNSPECIFIED'
	SERVING = 'SERVING'
	LIMITED = 'LIMITED'
	LEARNING = 'LEARNING'
	PAUSED = 'PAUSED'
	PENDING = 'PENDING'
	ENDED = 'ENDED'
	MISCONFIGURED = 'MISCONFIGURED'
	NOT_ELIGIBLE = 'NOT_ELIGIBLE'
	ARCHIVED = 'ARCHIVED'
	REMOVED = 'REMOVED'

@dataclasses.dataclass
class AdsCampaignBudget_period(str, Enum):
	DAILY = 'DAILY'
	MONTHLY = 'MONTHLY'
	TOTAL = 'TOTAL'
	LIFETIME = 'LIFETIME'

@dataclasses.dataclass
class AdsCampaignBudget_unit(str, Enum):
	UNSPECIFIED = 'UNSPECIFIED'
	CURRENCY = 'CURRENCY'
	IMPRESSIONS = 'IMPRESSIONS'

@dataclasses.dataclass
class AdsCampaignGoal(str, Enum):
	UNSPECIFIED = 'UNSPECIFIED'
	BRAND_AWARENESS = 'BRAND_AWARENESS'
	ENGAGEMENT = 'ENGAGEMENT'
	REACH = 'REACH'
	WEBSITE_TRAFFIC = 'WEBSITE_TRAFFIC'
	LEADS = 'LEADS'
	SALES = 'SALES'
	APP_PROMOTION = 'APP_PROMOTION'

@dataclasses.dataclass
class AdsCampaignAdvertising_channel_type(str, Enum):
	TEXT = 'TEXT'
	IMAGE = 'IMAGE'
	VIDEO = 'VIDEO'
	RESPONSIVE = 'RESPONSIVE'
	SHOPPING = 'SHOPPING'
	APP = 'APP'
	CALL = 'CALL'
	CAROUSEL = 'CAROUSEL'
	SOCIAL = 'SOCIAL'
	DISPLAY = 'DISPLAY'
	SEARCH = 'SEARCH'
	AUDIO = 'AUDIO'
	YOUTUBE = 'YOUTUBE'
	NATIVE = 'NATIVE'
	CTV = 'CTV'
	DOOH = 'DOOH'
	PERFORMANCE_MAX = 'PERFORMANCE_MAX'

@dataclasses.dataclass
class PropertyAdsCampaignTargeting:
	geographic: Optional[PropertyAdsCampaignGeographic]
	"""Demographic targeting (Meta: age_min, age_max, genders)"""
	demographic: Optional[PropertyAdsCampaignDemographic]
	audience: Optional[PropertyAdsCampaignAudience]
	placement: Optional[PropertyAdsCampaignPlacement]
	device: Optional[PropertyAdsCampaignDevice]
	language: Optional[PropertyAdsCampaignLanguage]
	content: Optional[PropertyAdsCampaignContent]
	"""Brand safety (Meta: excluded_publisher_categories, etc.; Google"""
	brand_safety: Optional[PropertyAdsCampaignBrand_safety]
	schedule: Optional[PropertyAdsCampaignSchedule]
	"""Optimization (Meta: targeting_automation; Google: observation vs targeting mode)"""
	optimization: Optional[PropertyAdsCampaignOptimization]
	"""Publisher inventory (ad units, placements) to include / exclude"""
	inventory: Optional[PropertyAdsCampaignInventory]
	"""Key-value targeting; clauses are ANDed"""
	custom: Optional[PropertyAdsCampaignCustom]
	"""Buy-side inventory: exchanges, deals, deal groups and seller authorization (DSPs)"""
	supply: Optional[PropertyAdsCampaignSupply]

@dataclasses.dataclass
class AdsCampaignFrequency_capTime_unit(str, Enum):
	UNSPECIFIED = 'UNSPECIFIED'
	LIFETIME = 'LIFETIME'
	MONTHS = 'MONTHS'
	WEEKS = 'WEEKS'
	DAYS = 'DAYS'
	HOURS = 'HOURS'
	MINUTES = 'MINUTES'

@dataclasses.dataclass
class PropertyAdsCampaignFrequency_cap:
	is_unlimited: Optional[bool]
	time_unit: Optional[AdsCampaignFrequency_capTime_unit]
	time_unit_count: Optional[int]
	max_impressions: Optional[int]
	max_views: Optional[int]

@dataclasses.dataclass
class AdsCampaignKpiType(str, Enum):
	UNSPECIFIED = 'UNSPECIFIED'
	CPM = 'CPM'
	CPC = 'CPC'
	CPA = 'CPA'
	CTR = 'CTR'
	VIEWABILITY = 'VIEWABILITY'
	CPIAVC = 'CPIAVC'
	CPE = 'CPE'
	CPV = 'CPV'
	CLICK_CVR = 'CLICK_CVR'
	IMPRESSION_CVR = 'IMPRESSION_CVR'
	VCPM = 'VCPM'
	VTR = 'VTR'
	AUDIO_COMPLETION_RATE = 'AUDIO_COMPLETION_RATE'
	VIDEO_COMPLETION_RATE = 'VIDEO_COMPLETION_RATE'
	CPCL = 'CPCL'
	CPCV = 'CPCV'
	TOS10 = 'TOS10'
	MAXIMIZE_PACING = 'MAXIMIZE_PACING'
	CUSTOM_IMPRESSION_VALUE_OVER_COST = 'CUSTOM_IMPRESSION_VALUE_OVER_COST'
	OTHER = 'OTHER'

@dataclasses.dataclass
class PropertyAdsCampaignKpi:
	type: Optional[AdsCampaignKpiType]
	amount: Optional[int]
	percentage: Optional[int]
	string_value: Optional[str]
	algorithm_id: Optional[str]

@dataclasses.dataclass
class AdsCampaign:
	id: Optional[str]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	created_at: Optional[str]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	updated_at: Optional[str]
	"""The campaign's name"""
	name: Optional[str]
	"""The ID of the ad account the campaign belongs to (an AdsOrganization ID)"""
	organization_id: Optional[str]
	status: Optional[AdsCampaignStatus]
	"""read-only; controlled by the provider (whether/why the campaign can serve), unlike the user-managed status"""
	effective_status: Optional[AdsCampaignEffective_status]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	start_at: Optional[str]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	end_at: Optional[str]
	budget_amount: Optional[int]
	budget_period: Optional[AdsCampaignBudget_period]
	budget_unit: Optional[AdsCampaignBudget_unit]
	total_spend_amount: Optional[int]
	targeting: Optional[PropertyAdsCampaignTargeting]
	goal: Optional[AdsCampaignGoal]
	planned_spend_amount: Optional[int]
	frequency_cap: Optional[PropertyAdsCampaignFrequency_cap]
	advertising_channel_type: Optional[AdsCampaignAdvertising_channel_type]
	"""Resource name for existing/shared budget (Google)"""
	campaign_budget_identifier: Optional[str]
	currency: Optional[str]
	"""Housing, employment, credit, NONE (Meta)"""
	category: Optional[str]
	has_eu_political_ads: Optional[bool]
	labels: Optional[List[List[str]]]
	kpi: Optional[PropertyAdsCampaignKpi]
	metadata: Optional[PropertyAdsCampaignMetadata]
Are we missing anything? Let us know
Was this page helpful?