Simple HTTP post to add a contact or group of contacts to a list
I'm trying to figure out the best way to POST a contact or group of contacts to a contact list. If this can be accomplished without using one of the language wrappers (in my case it would be the C# API wrapper), any help would be much appreciated. All we plan on doing is uploading a contact or group of contacts to a list that automatically sends an email out when a new contact is added. In the past I've written code for other websites that posts an XML or JSON string to a URL using HttpWebRequest objects in C#. Is this still possible through the CC API? Something similar to the V1 API. JSON or XML is fine.
Re: Simple HTTP post to add a contact or group of contacts to a list
Generally speaking it should be possible to POST or PUT with our API to add new contacts, or update existing contacts. The method and endpoint you would use will depend on a few factors, the most important being how many contacts you plan to work with.
The process for adding or updating individual contacts uses two API calls: one to GET the current contact properties or to check if the contact already exists, and another to PUT the updated properties (or POST the contact if brand new). This process will be fine if you are only adding or updating a small number of contacts. If you are looking to change or add a large number of contacts, it will be best to use the bulk import methods as API keys have limits on the number of calls that can be made per day (as well as per second).
You can post a new message in the Community or find us on Twitter Mon-Fri 8am-8pm ET, Sat 10am-8pm ET, & Sun 10am-6pm ET. We've got real people waiting to help you out. Click below to start a conversation!