Create campaign
POST
/ admin/ v1/ stores/ {store_id}/ campaigns- customers:write
- Idempotency-Key supported
Saves a draft.
Path parameters
store_idstringrequiredThe store's ID, like
store_01k8qs5s…. Apps get it with the install, in the OAuth redirect and the token response.
Headers
Idempotency-KeystringSend the same key to retry safely: the first answer is replayed for 24 hours.
shop-api-versionYYYY-MMThe version to answer in. Without it, your app’s pinned version, else the newest.
Body
namestringrequiredchannelenumrequiredHow a campaign reaches customers.
- sms
segment_idstring · or nullTypeID with the
segprefix.subjectstring · or nullEmail only.
bodystringbutton_labelstring · or nullbutton_urlstring · or nulldiscount_codestring · or nullA discount code to show (create it in Discounts, for the same segment).
Returns
201 Saved.
Errors
- 422
validation_failedInvalid fields.