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:98453
campaign
requiredinteger
Unique identifier of the Campaign
Examples:35393
Body Parameters
application/jsonemailrequiredstring
Valid email address as per RFC 2821
Examples:murray.kyleigh@bergnaum.net
Response Body
application/json
resultstring
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": "murray.kyleigh@bergnaum.net"
}';
$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":false}