Loading...

Description

Creates a new push action


Request URL

POST   https://api.3seventy.com/api/v2.1/account/{accountId}/action-pushCampaign

Request Properties

Parameter Description Mandatory
accountId The account Id which owns the action. Yes
Channels The channels to send the campaign on. Yes
Targets A list of targets to send to. These can be a mix of phone numbers, emails, or contact IDs. No
TargetsUrl A URL pointing to a list of targets to send to. No
ContactListIds A contact lists to push to. No
ExcludeListIds A contact lists to suppress from contact list. No
CampaignId The campaign to push. Yes
MediaId The media file to push No
Message Required if campaign type is basic. Forbidden when not basic. No
From Used for email channel. Can specify From address or default will be used. No
Subject Subject of the email No
IgnoreSingleUse Check if the event is Single Use Push Event. No
ForceOptIn Opt an existing contact into the subscription if opted out No
Schedules The list of schedules associated with the action No
Execute Set true if the action should be executed on creation No

Response Properties

Property Description
Channels The channels to send the campaign on.
Targets A list of targets to send to. These can be a mix of phone numbers, emails, or contact IDs.
TargetsUrl A URL pointing to a list of targets to send to.
ContactListIds The contact list IDs that the campaign was pushed to.
ExcludeListIds A contact lists to suppress from contacts to push to.
CampaignId The ID of the campaign that was pushed.
MediaId The ID of the media file that was pushed
Message Optional message pushed out. (BASIC Campaigns only)
From From Address for email channel
Subject Subject of the email.
IgnoreSingleUse Check if the event is Single Use Push Event.
ForceOptIn Opt an existing contact into the subscription if opted out
StatusId Status of an action

C#
PHP


using System;
using System.Collections.Generic;
using ThreeSeventy.Vector.Client;
using ThreeSeventy.Vector.Client.Models;

 

class Program
{

           static void Main(string[] args)

            {

       const string accountId = "XXXXXXXXXXXXXXXX";

       const int campaignId = XXXX;

       int[] channelIds = {XXX};

       string[] targets = { "XXX"}

       var context = new T70Context();

       var actionPushRepo = context.Repository<ActionPushCampaign>(new { AccountId = accountId });     

                var pushEvent = new ActionPushCampaign

{

CampaignId = campaignId ,

Channels = channelIds , // You can push to several channels in one go if you wish.

Targets = targets , // Note that is possible to send to more than one target at a time.

Execute = true

};

actionPushRepo.Add(pushEvent);

Console.WriteLine("Sent campaign {0} to channel(s) {1}", campaignId , String.Join(", ", pushEvent.Channels));

    }

}

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