post https://a.klaviyo.com/api/v1/campaigns
Creates a new campaign. The created campaign is a draft and is not automatically sent.
Response
Creates a new campaign. The created campaign is a draft and is not automatically sent.
xxxxxxxxxx
12curl --request POST \
--url 'https://a.klaviyo.com/api/v1/campaigns?api_key=PRIVATE_API_KEY' \
--header 'accept: application/json' \
--header 'content-type: application/x-www-form-urlencoded' \
--data list_id=LIST_ID \
--data template_id=TEMPLATE_ID \
--data from_email=george.washington@klaviyo.com \
--data 'from_name=George Washington' \
--data 'subject=Happy Fourth!' \
--data 'name=Campaign Name' \
--data use_smart_sending=true \
--data add_google_analytics=false
xxxxxxxxxx
48}
{
"object": "campaign",
"id": "CAMPAIGN_ID",
"name": "Campaign Name",
"subject": "Company Monthly Newsletter",
"from_email": "george.washington@klaviyo.com",
"from_name": "George Washington",
"lists": [
{
"object": "list",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"list_type": "list",
"folder": "string",
"created": "2019-08-24T14:15:22Z",
"updated": "2019-08-24T14:15:22Z",
"person_count": 0
}
],
"excluded_lists": [
{
"object": "list",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",