Loading...

PUT   https://api.3seventy.com/api/v2.1/account/{accountId}/contact/{contactId}?overrideSubscription={overrideSubscription}

Description

Updates a contact with the newly provided information.

Path Parameters

accountId integer The ID of the account which the contact falls under. required
contactId integer The ID of the contact to update required

Query Strings

overrideSubscription boolean This will override optout to optin optional

Request Properties application/json

PhoneNumber string Mobile number if available. optional
Email string Email address of the contact. optional
Subscriptions array[object] List of subscriptions this contact should be opted into. optional
Attributes array[object] List of attributes to set for this contact. optional


                    

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

var context = new T70Context();

var contactRepo = context.Repository<Contact>(new { AccountId = accountId });

var item = contactRepo.Get(id);

item.Email = "";

contactRepo.Update(item);

}

}