UPDATE CONTACTS

Updates existing contacts

This operation updates existing contacts by providing a unique id identification and the information you want to update.

You can update many contacts at once by providing an array of contacts.

REQUEST PARAMETERS

Parameter Data Type Demo Value Description
UpdateContacts object Update Contacts using attached info
Contact object Info about the people you want to contact. Any info needed can be stored under Contact as an extra attribute.
lastName string Doe Last name
externalId string nb-1010 id of contact defined by external system (NATION_BUILDER, GOOGLE_GROUPS, etc...)
mobilePhone PhoneNumber 18185551414 E.164 11 digit number
firstName string John First name
externalSystem string NATION_BUILDER System where externalId was generated from (NATION_BUILDER, GOOGLE_GROUPS, etc...)
homePhone PhoneNumber 18185551212 E.164 11 digit number
workPhone PhoneNumber 18185551313 E.164 11 digit number
zipcode string 98154 5 digit zipcode
Id long 123 Unique ID of Contact

Example

using RestSharp;
namespace [your-namespace]
{
    public class [your-class]
    {
        public string UpdateContact()
        {
            var client = new RestClient("https://www.callfire.com/api/1.1/rest/");
            client.Authenticator = new HttpBasicAuthenticator("YourLoginId", "password");

            var request = new RestRequest("contact", Method.PUT);
            request.AddParameter("Contact[0][id]", "18185551212");
            request.AddParameter("Contact[0][firstName]", "John"); 
            request.AddParameter("Contact[0][lastName]", "Doe");
            request.AddParameter("Contact[0][zipcode]", "98033");
            request.AddParameter("Contact[0][homePhone]", "4056054533");
            request.AddParameter("Contact[0][workPhone]", "3309232823");
            request.AddParameter("Contact[0][mobilePhone]", "3309232823");
            request.AddParameter("Contact[0][externalId]", "1234567890");
            request.AddParameter("Contact[0][externalSystem]", "ExternalSystemName");

            var response = client.Execute(request);
            string content = response.Content;
            return content;
        }
    }
}

The response code returned is:

204

Which means that the contact has been deleted successfully.