Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time

REST API: POST emailing (Marketing Suite)

You can post a Marketing Suite mailing with our REST API if you have already completed a template and prepared your database. To send a new mailing you send an HTTP POST request to the following URL:

Available parameters

There are three parameteres available, all of them required.

  • target: The ID of the emailing target.
  • targettype: The type of the target (database, collection, view, miniview, profile or subprofile)
  • template: The ID of the template to use.

Make sure your template is complete before posting the call. The mailing can not be sent without a valid subject and from address. You should also make sure your sender domain is configured correctly before attempting to send a mailing.

PHP example

The following script demonstrates how to call the API method. Don't forget to substitute the parameters for your own target and template.


// dependencies

// change this into your access token
$api = new CopernicaRestAPI("your-access-token", 3);

// parameters to pass to the call
$parameters = array(
    'target'                  => $targetID,
    'targettype'              => $targetType,
    'template'                => $templateID,

// execute the call
print_r($api->post("ms/emailing", $parameters));

// returns the id of created request if succesful

This example requires our REST API class.

More information