Loading...

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

Description

Opts a contact into the subscription. Contacts are sent a handset verification message.

Path Parameters

accountId integer The account ID which owns the subscription. required
subscriptionId integer The subscription ID which the contact is to be opted into. required

Request Properties application/json

ContactId integer The ID of the contact that is opted in. required
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 = new SubscriptionContact()
{

AccountId = accountId,

SubscriptionId = subscriptionId,

ContactId = contactId,

SmsEnabled = true,

MmsEnabled = false,

EmailEnabled = false,

VoiceEnabled = false

};

subContactRepo.Add(item);

}

}