If anyone need connect with API can be guide by my screenshots. We hope it help you.
Also take a look in documentation to understand how it works https://developers.activecampaign.com/reference?_ga=2.86311256.1786369874.1620138238-1226291895.1598277955
AC_POST - Create or update contact
Remember to set your account name in URLs
URL: https://ACCOUNTNAME.api-us1.com/api/3/contact/sync
Body (JSON object, use <> for dynamic values)
{
“contact”: {
“email”:“”,
“firstName”:“”,
“lastName”:“”,
“phone”: “”,
“fieldValues”:[
{
“field”:“”,
“value”:“”
},
{
“field”:“”,
“value”:“”
},
{
“field”:“”,
“value”:“”
}
]
}
}
I keep the ID fields as private, because I won’t change it.
You will need to know your CustomField ID to do this, I created another call with GET to search for the name and ID. I created the repeating group and a search bar to find the exact name and ID via the GET API
AC_GET_CustomFields
URL: https://ACCOUNTNAME.api-us1.com/api/3/fieldValues
AC_POST - Create or update contact (only EMAIL)
URL: https://ACCOUNTNAME.api-us1.com/api/3/contact/sync
AC_POST - Add a tag to contact
URL: https://ACCOUNTNAME.api-us1.com/api/3/contactTags
You will need to know your CustomField ID to do this, I created another call with GET to search for the name and ID. I created the repeating group and a search bar to find the exact name and ID via the GET API
AC_GET_Tags
URL: https://ACCOUNTNAME.api-us1.com/api/3/contactTags?limit=100&offset=[offset]
With you have more tga 100 tags you need use the offset to pagination.
AC_POST - Update list status for a contact
URL: https://ACCOUNTNAME.api-us1.com/api/3/contactLists
Status 1 is subscribes and 2 is unsubscrives. You will need to know your List ID. Find in your URL.
We hope it helps many ActiveCampaign users
Special thanks to @johnny . Helped a lot !