createFolder(string apikey, string name)
Create a new folder to file campaigns in
| Section | Helper |
|---|
| Parameters | |
|---|---|
| apikey | a valid API Key for your user account. Get by visiting your API dashboard |
| name | a unique name for a folder |
| Returns | |
|---|---|
| integer | the folder_id of the newly created folder. |
[1] mcapi_createFolder.php
<?php /** This Example shows how to send Delete Campaigns via the MCAPI class. **/ require_once 'inc/MCAPI.class.php'; require_once 'inc/config.inc.php'; //contains apikey $retval = $api->createFolder('MyTestFolder'); if ($api->errorCode){ } else { } ?>
[2] xml-rpc_createFolder.php
<?php /** This Example shows how execute a ping and check the result using XML-RPC. Note that we are using the PEAR XML-RPC client and recommend others do as well. **/ require_once 'XML/RPC2/Client.php'; require_once 'inc/config.inc.php'; try { $result = $client->createFolder('MyNewFolder'); } catch (XML_RPC2_FaultException $e){ } ?>