Loading...

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.


Request URL

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

Request Properties

Parameter Description Mandatory
accountId The ID of the account which the subscription belongs to. Yes
subscriptionId The ID of the subscription the contact is in. Yes
contactId The contact who's subscription preferences are to be changed. Yes
SmsEnabled Set if we can send an SMS to this contact on this subscription. No
MmsEnabled Set if we can send a MMS to this contact on this subscription. No
EmailEnabled Set if we can send an email to this contact on this subscription. No
VoiceEnabled Set if we can send a voice message to this contact on this subscription. No

C#
PHP


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);

}

}

 

Stay tuned for JAVA code snippet
Stay tuned for RUBY code snippet
Stay tuned for PHP code snippet