Loading...

Description

Updates a specific optin for a contact. Contacts are sent a handset verification message.


Request URL

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

Request Properties

Parameter Description Mandatory
accountId The account ID which owns the contact Yes
contactId The contact who's subscription is being adjusted Yes
subscriptionId The ID of the subscription to adjust 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
overrideSubscription This will override optout to optin 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 = XXXX;

const int contactId = XXXXX;

const int subscriptionId = XXXX;

var context = new T70Context();

var contactSubRepo = context.Repository<ContactSubscription>(new { AccountId = accountId, ContactId =contactId });

var item = contactSubRepo.Get(subscriptionId);

item.SmsEnabled = false;

contactSubRepo.Update(item);

}

}

 

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