You can add custom events to your contact’s timeline and activity log using the addNewActivity API call. This is beneficial if you would like to log data from your own platform to your account, such as support tickets and more.

To add a custom event, use the function below using CURL or PHP and replace the data with your own API KEY  as well as the contact’s id:


    // Replace {YOUR_API_KEY} with the API KEY provided from the link above.
    $user_key = array('api_key' => '{YOUR_API_KEY}');
    $app = new EmailMarketingWS($user_key);
    $parms = array(
        'id' => 'xxxxx',                              // Replace with the Contact ID
        'description' => 'this is my first activity', // Replace the Description with your Activity's description.
        'datetime' => '2018-08-23 18:00',             // Replace with the Date and Time the Activity is recorded

    $results = $app->addNewActivity($parms);


The end result will look like this:


Note that you can use the activity filter to preview the custom events within the contact’s timeline.

Get Started