POST /v1/campaigns creates a campaign funded from your organization’s credit wallet. Requires the campaigns:write scope, and your organization must be enabled for wallet billing.
Campaign creation has a financial side effect:
dailyBudget × durationDays is deducted from your
wallet balance at creation. The Idempotency-Key header is required so
retries never double-charge.Prerequisites
- An API key with the
campaigns:writescope — see Authentication - Enough wallet balance to cover
dailyBudget × durationDays(otherwise402 insufficient_credit) - A Spotify track or playlist URL to promote
Typical flow
- Pick a
strategyTypefrom the catalog - Create the campaign (wallet is debited)
- Poll campaign detail until
statusisactive - Track performance with metrics; adjust budget or stop via Managing campaigns
1. Pick a strategy
GET /v1/strategies (requires campaigns:read) returns the static catalog of strategyType values:
Built-in strategies apply Soundlink’s default geographic tiering internally. Only
custom accepts a tierTargeting object on create — sending tierTargeting with any other strategy returns 400 invalid_request.
2. Create the campaign
201):
creating and moves to active once setup completes (or failed if setup could not complete). Poll GET /v1/campaigns/{campaignId} to follow it.
Request fields
Supported genres
Alternative/Indie, Ambient/Sleep, Chill/Background, Classical, Country, Electronic/Dance, Hip-Hop/R&B, Latin/Reggaeton, Pop, Rock, Christmas
Any other value returns 422 invalid_genre.
Creative direction
do_it_for_me(default when omitted) — Soundlink generates the ad creatives.full_control— you supply your own videos.selectedCreativesmust contain at least onevideoId:
videoId, upload videos in the Soundlink app or import them by URL with the Videos API — see Importing videos for the full flow (import, poll, limits).
Custom tier targeting
WithstrategyType: custom you can control geographic budget allocation via tierTargeting:
customTierIds— reuse tier definitions your organization already created in the appcustomTiers— define tiers inline: each needsnameandpercentBudget, plus optionalcountries(ISO codes) andlanguage
422 invalid_tier_budget_allocation):
percentBudgetvalues must sum to exactly 100- At most 5 active tiers (
percentBudget > 0) - Each active tier must receive at least $1.50/day of
dailyBudget(gross)
tierTargeting on a custom campaign applies platform default tiering.
Idempotency
TheIdempotency-Key header is required on POST /v1/campaigns (and on stop and budget endpoints — see Managing campaigns).
- Any unique string up to 255 characters — a UUID or
<action>-<date>-<ref>pattern works well - Keys are honored for 24 hours
- Retrying with the same key and same body replays the recorded outcome — success or failure. A replayed success never creates a second campaign or a second charge.
- Reusing a key with a different body returns
409 idempotency_key_conflict - If a concurrent request with the same key is still processing, you also get
409— retry shortly
Wallet funding and errors
The full cycle cost (dailyBudget × durationDays) is reserved from your wallet when the campaign is created. If the balance is too low the API returns 402:
Idempotency-Key (see Idempotency).
Common create errors:
See Errors for the full list.