Loading...

Description

Create new campaign


Request URL

POST   https://api.3seventy.com/api/v2.1/account/{accountId}/campaign

Request Properties

Parameter Description Mandatory
accountId The ID of the account to create the campaign under. Yes
SubscriptionId The subscription that contacts who respond to this campaign are opted into.. No
Name The campaigns name Yes
CampaignTypeId The type of campaign Yes
ContentId Content that this campaign sends. No
Content Content to add to this campaign. No
UserData Arbitrary user data field No
SingleUse This Flag is for checking Single Send Campaign. No
SingleUseContentId This is set to the content Id for Single Send Campaign response. No
Links A list of links to create along with this campaign. No
IsDefault Indicates if its a default campaign No

Response Properties

Property Description
Id The unique ID of the campaign
AccountId The account to which the campaign belongs.
SubscriptionId The subscription that contacts who respond to this campaign are opted into.
Name The campaigns name
CampaignTypeId The type of campaign
StatusId The current status the campaign is in.
StatusReason Human readable status
ContentId Content that this campaign sends.
Session Indicates if this campaign will start a new session
SessionLength The durration of sessions in miliseconds from start.
UserData Arbitrary user data field.
Created When this campaign was created
Modified When this campaign was last modified
CreatedBy Who created the campaign
ModifiedBy Who last modified the campaign.
SingleUse This flag is for checking single send campaign.
SingleUseContentId This is set to the content id for response to send when the campaign is used more than once.

C#
PHP


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Linq;
using ThreeSeventy.Vector.Client;
using ThreeSeventy.Vector.Client.Enums;
using ThreeSeventy.Vector.Client.Models;

public class Program
{

private static void Main(string[] args)
{

const int accountId = XXXX;

const int subscriptionId = XXXX;

const int contentId = XXXX;

var context = new T70Context();

var campaign = new Campaign

{

Name = "SDK Test Campaign",

SubscriptionId = subscriptionId,

CampaignType = CampaignType.Basic,

ContentId = contentId

};

var campaignRepo = context.Repository<Campaign>(new { AccountId = accountId });

campaignRepo.Add(campaign);

}

}

 

Stay tuned for JAVA code snippet
Stay tuned for RUBY code snippet
Stay tuned for PHP code snippet