Loading...

PUT   https://api.3seventy.com/api/v2.1/account/{accountId}/campaign/{campaignId}/chat

Description

Updates an existing chat object so that summon channel and default group names can be adjusted.

Path Parameters

accountId integer The account which owns the campaign. required
campaignId integer The campaign which the chat object is attached. required

Request Properties application/json

SummonChannel string The channel to send summon messages on. required
GroupName string The default group to join the user to when they first sign in. required
AutoResponse string Set if you want to send auto respond when user answers your chat optional
AutoResponseMessage string Message to send as auto response optional


                    

Response Properties application/json

accountId integer The account which owns the campaign.
campaignId integer The campaign which the chat object is attached.
SummonChannel string The channel to send summon messages on.
GroupName string The default group to join the user to when they first sign in.
AutoResponse boolean Set if you want to send auto respond when user answers your chat
AutoResponseMessage string Message to send as auto response


                    

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 chatCampRepo = context.Repository<CampaignChat>(new { AccountId = accountId });

var item = chatCampRepo.Get(campaignId);

item.GroupName = "";

chatCampRepo.Update(item);

}

}