Loading...

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

Description

Opts a contact out of a subscription. It should be noted that the subscription object is not actually removed. The optin flags are simply set to false.

Path Parameters

accountId integer The ID of the account which owns the contact required
contactId integer The contact who's subscription is being removed required
subscriptionId integer The ID of the subscription to remove required

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

contactSubRepo.Delete(item);

}

}