Getting Started MailChimp API - PixelPowerLLC/NinjaForms---Addon-MailChimp-Multi-Referral GitHub Wiki
You need a MailChimp account obviously. Create one or get access to your client’s account.
The Critical piece of information is the API Key. MailChimp already has step by step instructions to find and create an API Key [MailChimp API Keys](https://mailchimp.com/help/about-api-keys/)
What the hell is the URL for the MailChimp API? I struggled with this for a bit.
MailChimp has regional API subdomains and the subdomain for your account is at the beginning of your API Key. The subdomain is formatted as [countrycode][2-digits numeric].
For example: If your API Key starts with US10 then the specific API URL for your account will become https://US10.api.mailchimp.com/3.0/
Make life easy and use a REST tool. I use [Insomnia](https://insomnia.rest/) which is a free REST tool that includes GraphQL.
Setup a GET request to your base API URL using basic authentication. Username can be anything Password is your MailChimp API Key
The GET request should return the API REST documentation.
The list of contacts in your MailChimp account is referred to as the audience. The fields in the audience list represent the data points you want to store for each contact. The merge field represents the external reference name for the audience field. Below the merge fields names are highlighted.
In this example the first audience field name is “First Name” and the merge field for this field is “FullName”. In script like PHP or Javascript you would use “Fullname” as the key.
For example in PHP
array( 'FULLNAME' => $full_name_data, 'PHONE' => $phone_data, )