Add contacts

API Docs by APIMATIC
API OverviewCampaigns

Add contacts
#

Add Contacts
#

The Add Contacts API is part of Voiso's Campaigns APIs. Use it to add new contacts/leads to an existing live Dialer campaign. The API endpoint description is here.

Prerequisites
#

  • The Dialer campaign must have the Live campaign setting enabled.
  • The campaign ID, which can be obtained by using List Campaigns API request or from the Outbound > Campaigns page.
  • A source for contacts/leads, such as a CRM or Helpdesk, and a list of one or more contacts to be added to the campaign.
  • A valid phone number for each contact in E.164 format without the preceding '+'. For example: 441234567890.

Making requests
#

The Add contacts API requires the base URL (cluster_id) and the contact center API key.

It uses the following parameters to add a contact list:

ParameterDescriptionTypeRequiredNotes
keyThe contact center API key for authentication.stringRequiredMust be included in the request URL.
campaign_idThe identification number associated with the campaign to which the contacts are to be added.stringRequiredMust be included in the request URL. It can be obtained by using the List Campaigns API request or from the Outbound > Campaigns page.
contactsAn array of phone numbers and contact information to be added to a Dialer campaign.arrayRequiredMust be included in the request Body.

Contacts array
#

ParameterDescriptionTypeRequiredNotes
phoneNumberThe recipient's phone number.stringRequiredThe number must be specified in E.164 format without the preceding '+'. For example: 447414992548
contactNameThe name of the contact.stringRequired
contactSourceThe name of the source of the contact information, such as a trade show, CRM, and so on.stringOptional
contactURLThe URL of a CRM or other integrated application where the contact’s record can be screen popped.stringOptionalFor more information about Voiso support for CRM screen pop, refer to CRM integration overview.
priorityA value assigned to the contact to determine the calling order for Dialer.stringOptionalThe range is from 0 to 1000, where 0 is the highest priority.
isActiveAn indicator of whether the contact should be dialed as part of the campaign.numberOptionalValid values are 0 and 1. 0 means the contact should not be called. 1 means the contact should be called.

With these parameters, you can make a POST request:

{
  "method": "POST",
  "url": "https://cluster1.voiso.com/api/v1/ab7a556b6...bb00cc6c3/campaigns/25735/contacts",
  "headers": {
    "Content-Type": "application/json"
  },
  "body": {
    "contacts": [
      {
        "phoneNumber": "4407414992548",
        "contactName": "Bill Bringy",
        "contactSource": "CRM",
        "contactURL": "https://myurl.com",
        "priority": "1"
      },
      {
        "phoneNumber": "4407415552548",
        "contactName": "Alicia Gonzales",
        "contactSource": "CRM",
        "contactURL": "https://myurl.com",
        "priority": "2"
      }
    ]
  }
}

Note: You may have multiple contacts parameters.

Response
#

The following table describes the elements of the response.

ElementDescriptionTypeNotes
duplicate_numbersPhone numbers that already exist in the campaign or that you are trying to add more than once.arrayAn array of strings.
invalid_numbersPhone numbers that are not in the E.164 format.arrayAn array of strings.
contactsPhone numbers successfully added to the campaign.arrayAn array of strings.

Response sample
#

{
  "duplicate_numbers": [
525555013275”,
    "541160905555"
  ],
  "invalid_numbers": [
525742360”,
1170347521  ],
  "contacts": [
    "541123654789",
541160908475”,
525552489136  ]
}

Troubleshooting
#

The following issues are sometimes encountered:

Invalid Key
#

The Add Contacts API requires the user API key to validate the request. If you see this error, "error": "Invalid Key", check that you are using the correct user API key. For more information about API keys, refer to Authentication.

Campaign not found
#

If you see this error, "error": "Campaign not found", the campaign ID that you specified in the request URL does not exist in your contact center or is not accessible to the user.

To verify the campaign ID, use the List Campaigns API to request it, or from the Outbound > Campaigns page, find the campaign ID in the Campaigns table.

To verify that the user has access to the specified campaign, check the user profile associated with the API request. The Edit all campaigns or Edit own campaigns permissions must be assigned to the user's profile.

Campaign type should be live
#

If you see this error, "error": "Campaign type should be live", the Live campaign option is not enabled for the specified campaign. To set this option, from the Voiso main menu bar, navigate to Outbound > Dialer campaigns and select the campaign. On the Edit campaign page, select Live campaign and save the campaign.

Maximum limit of 1000 contacts for each request
#

If you see this error, "error": "Maximum limit of 1000 contacts for each request", your POST request is attempting to add more than 1000 contacts to the campaign. To add more than 1000 contacts, make multiple requests of up to 1000 contacts each.

Required contact field missing
#

If you see this error, "error": "Required contact field missing - phoneNumber", there is no phone number available for one or more of the contacts you are trying to add to the campaign. Please ensure that you have a phone number for every contact you add to the campaign.


Was this page helpful?

Thank you! Your feedback has been received.