Loading...

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

Description

Creates new attach action.

Path Parameters

accountId integer The account Id which owns the action. required

Request Properties application/json

ChannelId integer ChannelID on which Action has to be Executed. required
KeywordId integer KeywordID to which campaign is attached required
CampaignId integer The ID of the campaign to attach ot the keyword required
Schedules array[object] The list of schedules associated with the action optional
Execute boolean Set true if the action should be executed on creation optional
{
  "ChannelId": 19,
  "KeywordId": 264,
  "CampaignId": 827,
  "Execute": true
}

Response Properties application/json

Id integer The Unique Id of the Action.
AccountId integer The account ID that the action reports under.
Schedules array[object] The list of schedules associated with the action
ChannelId integer Channel ID on which the action should be triggered
KeywordId integer Keyword ID to which campaign is attached
CampaignId integer The ID of the campaign to attach ot the keyword.
Created string DateTime when this action was first created.
Modified string DateTime when this action was last modified.
CreatedBy string Who initially created this action.
ModifiedBy string Who last modified this action
{
  "ChannelId": 1,
  "KeywordId": 264,
  "CampaignId": 827,
  "Id": 197,
  "AccountId": 4350,
  "Created": "2015-11-28T16:47:32",
  "Modified": "2015-11-28T16:47:32",
  "CreatedBy": "",
  "ModifiedBy": "",
  "Schedules": []
}

C#


using System;
using System.Collections.Generic;
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 = XXX;

var context = new T70Context();

var actionKeywordRepo = context.Repository<ActionAttachKeyword>(new { AccountId = accountId });

var item = actionKeywordRepo.Add(new ActionAttachKeyword()
{

AccountId = accountId,
CampaignId = XXXX,
ChannelId = XXXX,
KeywordId = XXXX

});

}

}