Loading...

Description

Creates a new contact for the given account.


Request URL

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

Request Properties

Parameter Description Mandatory
accountId The ID of the account that the contact will be for. Yes
PhoneNumber Mobile number if available. Yes
Email Email address of the contact. Yes
Subscriptions List of subscriptions this contact should be opted into. Yes
Attributes List of attributes to set for this contact. Yes

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

}

}

 

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