Loading...

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

Description

It is allowed to update DisplayName ONLY

Path Parameters

accountId integer The account ID to update chat log. required
conversationId integer Conversation Id required

Request Properties application/json

AccountId integer The account ID the conversation belongs to. required
AutoResponded boolean True if target already got auto-response message required
ContactId integer A contact you are talking to required
DisplayName string A name to display required
LastMessage string Last incoming message timestamp required
RealTarget string Real target -- holding phone number for SMS users required
Target string Collocutor(s) -- nick or channel name required
{
  "AccountId": 43510,
  "AutoResponded": false,
  "ContactId": 6047531,
  "DisplayName": "Test Phone 08",
  "LastMessage": "2018-06-28T16:35:48",
  "RealTarget": "+15125453XXX",
  "Target": "US5125453XXX"
}

Response Properties application/json

Id integer The ID the conversation log.
AccountId integer The account ID the conversation belongs to.
AutoResponded string True if target already got auto-response message
ContactId integer A contact you are talking to
DisplayName string A name to display
LastMessage string Last incoming message timestamp
RealTarget string Real target -- holding phone number for SMS users
Target string Collocutor(s) -- nick or channel name
UnreadCount integer Total messages unread.
{
  "Id": 1,
  "AccountId": 43510,
  "AssignedTo": 43510,
  "AutoResponded": false,
  "ContactId": 6047531,
  "DisplayName": "Test Phone 08",
  "FirstName": "Test",
  "LastName": "3808",
  "LastMessage": "2018-06-28T16:35:48",
  "RealTarget": "+15125453XXX",
  "Target": "US5125453XXX",
  "UnreadCount": 1,
  "Unsubscribed": false,
  "LastMessageData": null
}

C#


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

public class Program
{

private static void Main(string[] args)
{

const int accountId = XXXX;

const int conversationId = XXXX;

var context = new T70Context();

var chatConversationLogRepo = context.Repository<ChatConversationLog>(new { AccountId = accountId, ConversationId = conversationId });

var item = chatConversationLogRepo.Get(conversationId);

item.DisplayName = "updated!";

chatConversationLogRepo.Update(item);

}

}