Test campaign
v1
post
/1/newsletters/{domain}/campaigns/{campaign}/test
Allow to send a test campaign to an email. If the email is in the subscribers, custom fields will be filled
domain
requiredinteger
Unique identifier of the Domain
Examples:77664
campaign
requiredinteger
Unique identifier of the Campaign
Examples:62049
Body Parameters
application/jsonemailrequiredstring
Valid email address as per RFC 2821
Examples:dschmidt@hermiston.org
Response Body
application/json
resultrequiredstring
Possible values:successerrorasynchronous
Result of the HTTP request
Examples:success
databoolean
Example request
<?php
use GuzzleHttp\Client;
$client = new Client();
$headers = [
'Authorization' => 'Bearer YOUR-TOKEN-HERE',
'Content-Type' => 'application/json'
];
$body = '{
"email": "dschmidt@hermiston.org"
}';
$request = new Request('POST', 'https://api.infomaniak.com/1/newsletters/{domain}/campaigns/{campaign}/test', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
Example response
application/json
{"result":"success","data":true}