Loading...

PUT   https://api.3seventy.com/api/v2.1/account/{accountId}/subscription/{subscriptionId}/contact/{contactId}

Description

Updates a contact's subscription receipt options. Note that if no options are set, then the subscription is removed. Contacts are sent a handset verification message.

Path Parameters

accountId integer The ID of the account which the subscription belongs to. required
subscriptionId integer The ID of the subscription the contact is in. required
contactId integer The contact who's subscription preferences are to be changed. required

Request Properties application/json

SmsEnabled boolean Set if we can send an SMS to this contact on this subscription. optional
MmsEnabled boolean Set if we can send a MMS to this contact on this subscription. optional
EmailEnabled boolean Set if we can send an email to this contact on this subscription. optional
VoiceEnabled boolean Set if we can send a voice message to this contact on this subscription. 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 = XXX;

const int subscriptionId = XXXX;

const int contactId = XXXXX;

var context = new T70Context();

var subContactRepo = context.Repository<SubscriptionContact>(new { AccountId = accountId, SubscriptionId = subscriptionId });

var item = subContactRepo.Get(contactId);

item.SmsEnabled = false;

subContactRepo.Update(item);

}

}