The conversation between human and AI assistant.
How do I use PHP cURL to access the new MailChimp API v3.0?
Yes, I have. What do I do with that API key?
Great. With your API key, you can make a request to the MailChimp API using PHP cURL. Here's an example code snippet to help you get started:

$ch = curl_init(); // initialize cURL
curl_setopt($ch, CURLOPT_URL, 'https://<dc>.api.mailchimp.com/3.0/path/to/api/endpoint'); // set API endpoint URL
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Basic <API key>']); // set authorization header
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // return data instead of outputting it
$response = curl_exec($ch); // execute cURL request
curl_close($ch); // close cURL