Append Contacts To List
This endpoint allows you to add contacts to a specific list identified by list_id.
Using the SDK
API Endpoint
POST
https://api.dropcowboy.com/v1/list/{list_id}/contactsExample Request
Required Headers
x-team-id- Your Team ID from API settingsx-secret- Your Secret Key from API settings
Required URL Path Parameters
list_id(string) - The id of the list to be updated. This parameter is required.
Required Body Parameters
fields(array of strings): An array specifying the fields that will be populated for each contact (e.g., ["record_id"]). This parameter is required.values(array of arrays): An array of arrays. Inner arrays contain the values associated with the field types you specify in the fields attribute. You may pass in up to 10,000 contacts per API call. This parameter is required.
Optional Body Parameters
region(string): Array of strings that define the data types being passed in thevaluesattribute. It is acceptable to have repeat field types specified if your contacts have multiple phone numbers, pass in the value of "phone" multiple times in this array. Possible field types are:record_id,first_name,last_name,company,email,phone,address1,address2,city,state,postal,country,custom1,custom2,custom3,custom4,custom5.
Requires two headers: x-team-id and x-secret. Both must be sent with each request.
Array of strings that define the data types being passed in the Values attribute. It is acceptable to have repeat field types specified if your contacts have multiple phone numbers, pass in the value of “phone” multiple times in this array. Possible field types are: record_id, first_name, last_name, company, email, phone, address1, address2, city, state, postal, country, custom1, custom2, custom3, custom4, custom5. (Required)
The ISO country code to use when converting your phone number values to E.164 format. If yourphone numbers are already formatted in E.164 then the region attribute is ignored. Defaults to US.
Returns accepted_count and rejected details.
Returns accepted_count and rejected details.
Example Response
The response will be in JSON format and will include the following fields:
accepted_count(integer): The number of contacts appended to the list.rejected(array): An array of objects containing the index of the rejected contact from the value array that you passed to the api and the reason that contact was rejected, where each object contains:index(integer): The index of the rejected contact in the original request.reason(string): The reason for rejection (if applicable).
Last updated
Was this helpful?