DealSleek API · Marketing
PreviewCreate Campaign
Create a new marketing campaign in DRAFT state.
/api/v1/marketing/dispatchHeaders
AuthorizationstringRequiredAccess token of the signed-in user, as a Bearer token. It identifies the user, their role and the workspace.
X-CQRS-ActionstringRequiredNames the command to run. Must be
CREATE_CAMPAIGNfor this endpoint.Content-TypestringRequiredAlways
application/json.X-Idempotency-KeystringOptionalA key you choose that is unique to this attempt. A command repeated with the same key is not applied a second time.
X-Correlation-IdstringOptionalYour own identifier for the request. Returned in the
x-correlation-idresponse header; generated when you leave it out.
Request body
budgetobjectRequiredNo description yet.
2 child fields
amountnumberRequiredNo description yet.
currencyCodestringRequiredNo description yet.
kindenumRequiredNo description yet.
- Allowed values
- AD_REMARKETING
- MULTI_CHANNEL
- SOCIAL
namestringRequiredNo description yet.
- minimum length 1
tenant_iduuidRequiredNo description yet.
account_iduuid or nullOptionalNo description yet.
ad_groupsarray of objectOptionalOperator-authored ad-group rows. Lands on the aggregate as
ad_group_specs— the runtimead_groups(AI ad variants) is a different concept and stays engine-owned.6 child fields
descriptionsstringOptionalOne description per line (Google wants 2–4).
final_urlstringOptionalNo description yet.
headlinesstringOptionalOne headline per line (Google wants 3–15).
keywordsstringOptionalOne keyword per line.
namestringOptionalNo description yet.
negativesstringOptionalOne negative keyword per line.
ad_platformenum or nullOptionalNo description yet.
- Allowed values
advertising_channelenum or nullOptionalThe primary advertising blueprint (Google: Search/PMax, Meta: Feed/Story).
- Allowed values
- SEARCH
- DISPLAY
- PERFORMANCE_MAX
- SOCIAL_FEED
- SOCIAL_VIDEO
- DEMAND_GEN
- DEMAND_GEN
- Google's YouTube + Discover + Gmail surface. Replaced Discovery in 2023 and is now absorbing both Video Action and standalone Display. Unlike PMax it exposes real per-surface channel controls.
attribution_modelenum or nullOptionalMulti-touch attribution algorithm selection. The retro causal_uplift computation reads this off the campaign at archival time.
- Allowed values
- LAST_TOUCH
- FIRST_TOUCH
- LINEAR
- U_SHAPE
- TIME_DECAY
autonomous_orchestrationbooleanOptionalNo description yet.
- Default
- false
bidding_strategyenum or nullOptionalBidding strategy applied to the campaign on the native platform.
- Allowed values
- TARGET_CPA
- TARGET_ROAS
- MAXIMIZE_CONVERSIONS
- MAXIMIZE_CLICKS
- MANUAL_CPC
- MAXIMIZE_CONVERSION_VALUE
- TARGET_IMPRESSION_SHARE
- MAXIMIZE_CONVERSION_VALUE
- Optimizes total conversion VALUE rather than conversion COUNT. This is the strategy a B2B seller wants once closed-won revenue flows back — count-based strategies reliably buy the cheapest leads, which in B2B are usually the worst.
- TARGET_IMPRESSION_SHARE
- Search-only on Google. Bids toward a share of impressions rather than a conversion outcome — brand defense, not performance.
budget_typeenum or nullOptionalHow the budget is paced on the ad platform.
- Allowed values
- DAILY
- LIFETIME
business_namestring or nullOptionalNo description yet.
calloutsstring or nullOptionalNo description yet.
causal_objectiveenum or nullOptionalShifts the goal from "Predictive" (who will buy anyway) to "Causal" (who will buy *only if* they see this campaign).
- Allowed values
- TRADITIONAL_CONVERSION
- MAXIMIZE_INCREMENTAL_UPLIFT
- MINIMIZE_CHURN_RISK
- OPTIMIZE_LIFETIME_VALUE
connector_binding_iduuid or nullOptionalNo description yet.
connector_binding_idsarray of uuidOptionalNo description yet.
display_long_headlinestring or nullOptionalNo description yet.
display_marketing_image_urlstring or nullOptionalNo description yet.
display_square_image_urlstring or nullOptionalNo description yet.
excluded_location_idsarray of stringOptionalNo description yet.
frequency_cap_maxinteger or nullOptionalNo description yet.
- at least 0
frequency_cap_window_hoursinteger or nullOptionalNo description yet.
- at least 0
goal_kindenum or nullOptionalNo description yet.
- Allowed values
- REVENUE
- LEADS
- MQLS
- SQLS
- CONVERSIONS
- PIPELINE
- ROAS
- IMPRESSIONS
- REACH
- CPM
- CLICKS
- SESSIONS
- CTR
- CPC
- ENGAGEMENT_RATE
- INTERACTIONS
- VIDEO_VIEWS
- CHURN_RATE
- LTV
- REPEAT_RATE
goal_target_valuenumber or nullOptionalNo description yet.
google_ads_customer_idstring or nullOptionalNo description yet.
linkedin_ad_formatenum or nullOptionalLinkedIn specific ad formats.
- Allowed values
- SINGLE_IMAGE
- CAROUSEL
- DOCUMENT
- MESSAGE_AD
- CONVERSATION_AD
linkedin_targeting_modeenum or nullOptionalLinkedIn specific targeting mode. Outsmarts legacy "Matched Audiences" by allowing deep AI integration with the CRM's Buying Committee graph.
- Allowed values
- BROAD
- ACCOUNT_LIST
- BUYING_COMMITTEE_MICRO_TARGETING
- BUYING_COMMITTEE_MICRO_TARGETING
- The "Beyond CRM" feature: Natively synchronizes the CRM's Stakeholder Graph to LinkedIn, ensuring budget is spent ONLY on High-Influence Economic Buyers and explicitly excluding identified Blockers.
location_intentenum or nullOptionalWho counts as "in" a targeted location — Google's geo_target_type_setting.
- Allowed values
- PRESENCE_OR_INTEREST
- PRESENCE
- PRESENCE_OR_INTEREST
- People in, regularly in, or interested in the location — Google's own default, and the reach most campaigns want.
- PRESENCE
- Only people physically in the location. The safer read for local-service and regulated offers.
meta_ad_account_idstring or nullOptionalWhich Meta ad account pays, and which Page the ads publish as. Two picks because Meta has two objects; both bare ids (no
act_prefix).meta_age_maxinteger or nullOptionalNo description yet.
meta_age_mininteger or nullOptionalNo description yet.
meta_billing_eventenum or nullOptionalWhat Meta CHARGES for — distinct from what it optimizes toward.
- Allowed values
- IMPRESSIONS
- LINK_CLICKS
meta_call_to_actionenum or nullOptionalThe button on a Meta ad.
- Allowed values
- LEARN_MORE
- SIGN_UP
- GET_QUOTE
- CONTACT_US
- BOOK_TRAVEL
- SUBSCRIBE
- DOWNLOAD
- APPLY_NOW
meta_countriesarray of stringOptionalISO-3166 alpha-2 country codes. Meta targets by country code, NOT by the geo-constant ids Google uses — two vocabularies for one idea.
meta_gendersenum or nullOptionalWho an ad set targets by gender.
- Allowed values
- ALL
- MEN
- WOMEN
meta_headlinestring or nullOptionallink_data.name— the bold line under the image.meta_image_urlstring or nullOptionalMeta fetches this URL rather than us uploading bytes.
meta_linkstring or nullOptionalWhere the click goes. The button, when present, must use the same link or Meta rejects the pair.
meta_link_descriptionstring or nullOptionallink_data.description— the smaller line under that.meta_objectiveenum or nullOptionalWhat a Meta campaign is for — the ODAX objective.
- Allowed values
- OUTCOME_AWARENESS
- OUTCOME_TRAFFIC
- OUTCOME_ENGAGEMENT
- OUTCOME_LEADS
- OUTCOME_SALES
- OUTCOME_APP_PROMOTION
- OUTCOME_AWARENESS
- Reach as many people as possible. The old silent default.
- OUTCOME_TRAFFIC
- Send people to a destination.
- OUTCOME_ENGAGEMENT
- Post engagement, video views, messages.
- OUTCOME_LEADS
- Collect leads — instant forms, calls, sign-ups. What a B2B seller almost always wants, and what the silent default was denying them.
- OUTCOME_SALES
- Purchases and conversions.
- OUTCOME_APP_PROMOTION
- App installs and in-app events.
meta_optimization_goalenum or nullOptionalFacebook/Meta specific optimization goals (controls the algorithm).
- Allowed values
- LINK_CLICKS
- IMPRESSIONS
- REACH
- CONVERSIONS
- LEAD_GENERATION
- VALUE
meta_page_idstring or nullOptionalNo description yet.
meta_placementsarray of enum or nullOptionalNo description yet.
- Allowed values
- AUTOMATIC
- FACEBOOK_FEED
- INSTAGRAM_FEED
- INSTAGRAM_STORIES
- AUDIENCE_NETWORK
- MESSENGER
meta_primary_textstring or nullOptionalThe text above the image.
objectiveenum or nullOptionalWhat the campaign is trying to achieve. Drives bidding strategy on the channel adapters and attribution weighting in the retro causal_uplift.
- Allowed values
- AWARENESS
- TRAFFIC
- ENGAGEMENT
- LEADS
- SALES
- RETENTION
owner_iduuid or nullOptionalNo description yet.
platform_specanyOptionalNo description yet.
scheduled_end_atdate-time or nullOptionalNo description yet.
scheduled_start_atdate-time or nullOptionalNo description yet.
segment_iduuid or nullOptionalNo description yet.
sentiment_weightingenum or nullOptionalHow account sentiment affects real-time ad bidding (Supernatural Layer).
- Allowed values
- IGNORE_SENTIMENT
- THROTTLE_NEGATIVE
- SUPERNATURAL
sitelinksarray of objectOptionalNo description yet.
4 child fields
description1stringOptionalNo description yet.
description2stringOptionalNo description yet.
textstringOptionalNo description yet.
urlstringOptionalNo description yet.
special_ad_categoriesarray of enum or nullOptionalNo description yet.
- Allowed values
- NONE
- CREDIT
- EMPLOYMENT
- HOUSING
- POLITICS
supernatural_prompt_iduuid or nullOptionalNo description yet.
target_cpa_microsinteger or nullOptionalTarget for a TargetCpa strategy, in micros (1 USD = 1_000_000) to match the platform unit and avoid a float round-trip on money.
target_language_idsarray of stringOptionalNo description yet.
target_location_idsarray of stringOptionalGeo-constant ids, never names — campaignCriteria takes ids.
target_placementsstring or nullOptionalNo description yet.
target_roasnumber or nullOptionalTarget for a TargetRoas strategy. A ratio, NOT a percentage: 4.0 means a 400% return target.
template_iduuid or nullOptionalNo description yet.
utm_campaignstring or nullOptionalNo description yet.
utm_contentstring or nullOptionalNo description yet.
utm_mediumstring or nullOptionalNo description yet.
utm_sourcestring or nullOptionalNo description yet.
utm_termstring or nullOptionalNo description yet.
Response
Status 202. The command was applied. The body reports the outcome and, where the command changes a record, that record's new state.
successbooleanRequiredtruewhen the command was applied.error_messagestringRequiredEmpty when the command was applied.
projected_stateobjectOptionalThe record as it stands after the command.
event_payloadobjectOptionalThe event the command recorded.
insightsarray of objectOptionalAdvisory notes about the result. Each has a
code, amessageand animpactnumber.
Errors
Every error carries an HTTP status. Where it also carries a code, branch on the code, not on the message.
- 400
X-CQRS-Actionis missing or names a command this route does not accept. SendCREATE_CAMPAIGN. - 400
DOMAIN_ROUTINGThe body is not a valid command. Check the required fields and their types. - 401The access token is missing, expired or not valid.
- 401
L1_AUTHThe caller's role is belowmanageror the caller has no access to this record. - 403
L1_POLICYA business rule refused the command. The message names the rule. - 409
L1_IDEMPOTENCYA command with this idempotency key was already applied. - 409
CONFLICTThe command would duplicate a record that must be unique. - 500
L3_COMMITThe command was valid but could not be saved.