Loading...

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

Description

Defines a new valid response to a question campaign.

Path Parameters

accountId integer The account which owns the campaign required
campaignId integer The campaign which the answer should be placed into required

Request Properties application/json

NextCampaignId integer The next campaign to run in the dialog. required
ContentId integer The ID of the text message content. required
Content object The content of the answer. required
Validator string A regular expression that is used to validate the user's response to the answer. required
OrderingId integer A user definable ID to order the answers by on multiple choise questions. required
Value string The value that is actually saved when we receive this answer. required
Label string The lable to display in the user interface. optional
Description string The description of the answer. optional


                    

C#


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 campaignId = XXXX;

var context = new T70Context();

var campQuesAnsDefRepo = context.Repository<CampaignQuestionAnswerDefinition>(new { AccountId = accountId, CampaignId = campaignId });

var item = new CampaignQuestionAnswerDefinition()

{

AccountId = accountId,

ContentId = XXXXX,

AnswerId = XXXXX,

Description = "",

CampaignId = XXXXX,

NextCampaignId = XXXXX,

Value = "",

OrderingId = XXXXX

};

campQuesAnsDefRepo.Add(item);

}

}