Here is some steps for integrating mailchimp in CI application:

 $config['Mailchimp_api_key'] = 'XXXXXXXXXXXXXXXXXXXXXX-XXXX';

		$this->load->library('MailChimp', $config);
		$list_id = 'XXXXXXXXX';

		$result = $this->mailchimp->post("lists/$list_id/members", [
                'email_address' => 'parth@techcompose.com',
                'merge_fields' => ['FNAME'=>'Parth', 'LNAME'=>'Shah'],
                'status'        => 'subscribed',
                 ]);

		echo '<pre>';
		print_r($result);exit;
  • You can find list_id from – Lists > Settings > List Name and defaults.