MENU
CallFire - Your Message Delivered
Call Us! (877) 897-3473
CLOSE
  • Products
  • Pricing
  • Developers
  • Help
  • Log In
  • Sign Up
Call Us! (877) 897-3473

CreateContactList

CallFire has a new API!

We are proud to announce the launch of our API 2.0! Learn more about our streamlined, transactional and broadcast APIs. This version of the API documentation will remain available for reference only. There will be no new development, only bug fixes. We highly recommend upgrading to our newer and more sophisticated documentation.

CallFire-API-Documentation

  • ▶/BroadcastService
    • CreateBroadcast
    • QueryBroadcasts
    • GetBroadcast
    • UpdateBroadcast
    • GetBroadcastStats
    • ControlBroadcast
    • CreateContactBatch
    • QueryContactBatches
    • GetContactBatch
    • ControlContactBatch
    • CreateBroadcastSchedule
    • QueryBroadcastSchedule
    • GetBroadcastSchedule
    • DeleteBroadcastSchedule
  • ▶/SubscriptionService
    • CreateSubscription
    • QuerySubscriptions
    • GetSubscription
    • UpdateSubscription
    • DeleteSubscription
  • ▶/TextService
    • SendText
    • QueryTexts
    • GetText
    • CreateAutoReply
    • QueryAutoReplies
    • GetAutoReply
    • DeleteAutoReply
  • ▶/CallService
    • SendCall
    • QueryCalls
    • GetCall
    • CreateSound
    • QuerySoundMeta
    • GetSoundMeta
    • GetSoundData
    • GetRecordingData
    • SendVerificationCodeToCallerId
    • VerifyCallerId
    • GetCallerIds
  • ▶/CccService
    • GetCccCampaign
    • GetCccCampaignStats
    • CreateCccCampaign
    • QueryCccCampaigns
    • UpdateCccCampaign
    • DeleteCccCampaignTransferNumbers
    • DeleteCccCampaignQuestions
    • ControlCccCampaign
    • DeleteCccCampaign
    • GetAgent
    • QueryAgents
    • AddAgents
    • GetAgents
    • RemoveAgent
    • GetAgentGroup
    • QueryAgentGroups
    • CreateAgentGroup
    • UpdateAgentGroup
    • AddAgentGroups
    • GetAgentGroups
    • DeleteAgentGroup
    • RemoveAgentGroup
    • GetAgentSession
    • QueryAgentSessions
    • SendAgentInvites
    • GetAgentInviteUri
  • ▶/ContactService
    • QueryContacts
    • UpdateContacts
    • RemoveContacts
    • GetContact
    • GetContactHistory
    • CreateContactList
    • QueryContactLists
    • DeleteContactList
    • AddContactsToList
    • GetContactList
    • RemoveContactsFromList
    • QueryDncNumbers
    • UpdateDncNumber
    • QueryDncLists
    • CreateDncList
    • GetDncList
    • DeleteDncList
    • AddNumbersToDncList
    • RemoveNumbersFromDncList
  • ▶/NumberService
    • QueryRegions
    • QueryNumbers
    • GetNumber
    • ConfigureNumber
    • SearchAvailableNumbers
    • QueryKeywords
    • SearchAvailableKeywords
    • CreateNumberOrder
    • GetNumberOrder
    • Release
  • ▶/LabelService
    • DeleteLabel
    • QueryLabels
    • LabelBroadcast
    • UnlabelBroadcast
    • LabelNumber
    • UnlabelNumber
  • API    >  
  • ContactService  >  
  • CreateContactList

CreateContactList

Create new contact list and add to account

Add contact list to account using 1 of 4 inputs: list of contacts, numbers string, list of contactIds, or csv file containing contacts or numbers. If more then one ContactSource specified then only load from 1 source with precedence as listed above.

On import contact lists go through seven system safeguards that check the accuracy of the list. For example, our system checks if a number is formatted correctly, is invalid, is duplicated in another contact list, or is on your Do Not Contact list. API calls have their default validation error resolutions set differently then the defaults set on the CallFire web site under Settings | List Validation. The API validation defaults are:

LIST_COLUMNS_UNMAPPEDResolution USE_DEFAULT_COLUMNS
LIST_HAS_DUPLICATE_NUMBERSResolution SCRUB
LIST_HAS_DNC_CONTACTSResolution SCRUB
LIST_HAS_CONTACT_CONFLICTSResolution MERGE
LIST_HAS_INVALID_NUMBERSResolution SCRUB

Request Parameters

Parameter Demo Value Description Data Type
CreateContactList Create ContactList using attached info object
RequestId Unique ID, used to de-dup requests and make sure request is not processed twice anyURI
Name Name of contact list string
Validate Turn off list validation (default: true) boolean
ContactSource List of contacts, numbers, contactIds, or csv file. object
Contact * Info about the people you want to contact. Any info needed can be stored under Contact as an extra attribute. object
mobilePhone E.164 11 digit number PhoneNumber
homePhone E.164 11 digit number PhoneNumber
extraPhone1 E.164 11 digit number PhoneNumber
externalSystem System where externalId was generated from (NATION_BUILDER, GOOGLE_GROUPS, etc...) string
zipcode 5 digit zipcode string
extraPhone2 E.164 11 digit number PhoneNumber
firstName First name string
lastName Last name string
extraPhone3 E.164 11 digit number PhoneNumber
externalId id of contact defined by external system (NATION_BUILDER, GOOGLE_GROUPS, etc...) string
id Unique ID of Contact long
workPhone E.164 11 digit number PhoneNumber
ContactId * List of existing contact ids List[long]
File * Csv file attachment containing list of contacts or numbers base64Binary
Numbers * List of E.164 11 digit numbers space or comma seperated and optional fieldName object
fieldName field number should be assigned to homePhone, workPhone or mobilePhone (default: homePhone) string

* indicates choice value, bolded parameters are required

Response Parameters

Parameter Description Data Type
CreatedId Unique ID of resource long

 

Example Code

	<?php
/**
 * You'll need your login/password pair when you create the SOAP client.
 * Don't use the fake login/password provided here; it's just for show and won't work.
 */
$wsdl = "http://callfire.com/api/1.1/wsdl/callfire-service-http-soap12.wsdl";
$client = new SoapClient($wsdl, array(
    'soap_version' => SOAP_1_2,
    'login'        => 'YourLoginId',    
    'password'     => 'YourPassword'));



/**
 * CreateContactList.  Add contact list to account using 1 of 4 inputs: list of
 * contacts, numbers, list of contactIds, or file.
 */
//
// First lets create contact list from list of contacts.
//
$request = new stdClass();
$request->Name = 'API created contact list from list of contacts'; // string required  
$request->ContactSource = new stdclass(); //  required  
$request->ContactSource->Contact = array(); //required choice
$request->ContactSource->Contact[0] = new stdClass(); // object  
$request->ContactSource->Contact[0]->firstName = 'John'; // string   
$request->ContactSource->Contact[0]->lastName = 'Smith'; // string   
$request->ContactSource->Contact[0]->mobilePhone = '3105551212'; // PhoneNumber   
$request->ContactSource->Contact[1] = new stdClass(); // object
$request->ContactSource->Contact[1]->firstName = 'Jane'; // string
$request->ContactSource->Contact[1]->lastName = 'Doe'; // string
$request->ContactSource->Contact[1]->mobilePhone = '8185551212'; // PhoneNumber

$response = $client->CreateContactList($request);
print_r($response);

// Sample output:
// 24915001

//
// Create contact list from numbers.
//
$request = new stdClass();
$request->Name = 'API created contact list from numbers'; // string required
$request->ContactSource = new stdClass(); // required
$request->ContactSource->Numbers = array();
$request->ContactSource->Numbers['_'] = '3105551213 3105551213'; // required PhoneNumberList
$request->ContactSource->Numbers['fieldName'] = 'mobilePhone'; // string defaults to 'homePhone'

$response = $client->CreateContactList($request);
print_r($response);

// Sample output:
// 24915001

//
// Create contact list from list of contactIds.
//
$request = new stdClass();
$request->Name = 'API created contact list from contactIds'; // string required
$request->ContactSource = new stdClass(); // required
$request->ContactSource->ContactId = '2 3'; // required idList

$response = $client->CreateContactList($request);
print_r($response);

// Sample output:
// 24916001

//
// Create contact list from csv file with content like:
// firstName, lastName, mobilePhone
// John, Smith, 13105551215
// Jane, Doe, 18185551215
//
$request = new stdClass();
$request->Name = 'API created contact list from csv file'; // string required
$request->ContactSource = new stdClass(); // required
$request->ContactSource->File = stream_get_contents(fopen('Contacts.csv', 'rb')); // required base64Binary

$response = $client->CreateContactList($request);
print_r($response);

// Sample output:
// 24917001

?>

Company

  • Careers
  • Blog
  • Press

Products

  • Text Messaging
  • Call Tracking
  • Voice Broadcast
  • CallFire IVR
  • Developer API

Resources

  • Case Studies
  • Industries
  • Communications Glossary
  • Marketing Glossary
  • Area Codes
  • Labs

Help

  • FAQs
  • CallFire XML
  • Contact Us
  • Reviews
  • System Status

© Copyright 2021 CallFire Inc. All Rights Reserved

Privacy Policy / Terms / Service Policy / FTC/FCC/DNC Compliance / Sitemap

Contact Support
Contact Sales
Phone +1.877.897.3473
Fax +1.310.943.0415

Msg&data rates may apply in the US. Standard message and data rates apply in Canada. To unsubscribe from any CallFire ® list simply send 'STOP' to the originating short code or contact Support.