Loading...

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

Description

Creates a new contact for the given account.

Path Parameters

accountId integer The ID of the account that the contact will be for. required

Request Properties application/json

PhoneNumber string Mobile number if available. required
Email string Email address of the contact. required
Subscriptions array[object] List of subscriptions this contact should be opted into. required
Attributes array[object] List of attributes to set for this contact. 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 string phoneNumber = "";

const string email = "";

var context = new T70Context();

var contactRepo = context.Repository<Contact>(new { AccountId = accountId });

var contact = new Contact

{

PhoneNumber = phoneNumber,

Email = email

};

contactRepo.Add(contact);

}

}