Adding a contact from good old-fashioned Visual Basic (not


Adding a contact from good old-fashioned Visual Basic (not



I consider myself a dated but competent VBA programmer, and our customer billing system is in Microsoft Access.  Does anyone know how to use the CC APIs to add a contact to a list from 20th century Visual Basic that I could use inside my Access database?  All I want to do is to have a contact automatically added to 2-3 lists in my CC account whenever I register a customer in my database application.


I'd appreciate any guidance or suggestions - I'm not a web programmer at all, so the code for php etc is not much help to me, and although I might be able to struggle through the examples and convert back to VB I would think someone has done this before.


Any help appreciated





Hey Simon,


I am not all too familiar with VB6 but I do believe I found some information to point you in the right direction.  Check out this forum post on vBforums to which will explain how to use win sock to get what you need.  From there you would create the contact by passing in the the correct XML which you can find in our api documentation.  The one big difference you will need to think of when you write this code is to see if the contact already exists in the account by using the search by email address query. If they do not exist you would create the contact with the appropriate lists by doing a POST. If they do exist you would yould update the contact by doing a PUT.


The other part that I when you supply the list ID it is not the number that you see in the user interface that is a SORT number which is just used to sort your lists.  The list ID is inside of the URI if you hover over the link or if you do a get to your lists collection.


I know this isn't an exact science of what you need to do but it should get you started and give you the logic to put your algorithm together

Ryan Davis
Quality Engineer
Developer Portal

View API documentation, code samples, get your API key.

Visit Page