Skip to navigation

Send your first API request

Install a client library

You can call the Marketing API with whatever you normally use to make HTTP requests, but a client library handles authentication and response parsing for you. Install the one for your language:

# No client installation necessary; just using curl

Make your first API call

To test that you have everything set up correctly, we’ll make a simple request to the Ping endpoint. Hitting this endpoint acts as a health check on the Mailchimp API service; it won’t affect your account in any way.

# install jq: https://stedolan.github.io/jq/download/
apikey="YOUR_API_KEY"
curl -sS \
"https://api.mailchimp.com/3.0/ping" \
--user "anystring:${apikey}" | jq -r

If everything was set up correctly and the request to ping was a success, the response should look like the following:

{
"health_status": "Everything's Chimpy!"
}

Next steps

Now that you’re successfully making authenticated requests to the API with your API key and client library of choice, you’re ready to dive into the Mailchimp Marketing API. 

The first thing you may want to do is learn how to import and export contacts between your application and a Mailchimp audience. You may also want to familiarize yourself with the Marketing API docs, which outline some of the common conventions you’ll run into across the API, or browse the extensive API Reference documentation.