API in the notification text use <br>

See below PHP, I use to send notifications to the API in the text field I would like to use the html “breakline” <br> but it isn’t beeing rendered in the notifications. Is it possible to use multi-lines in the text?

Regards
Michael Larsen

<?php

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://management-api.wonderpush.com/v1/deliveries');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array(
      'accessToken' => 'TOKEN',
      'targetSegmentIds' => '@ALL',
      'campaignId' => '01dqh1msgec0qgb2',
      'notification' => json_encode([
        'alert' => [
          'tag' => '114',
          'title' => 'Dansk Super Kart besked...',
          'text' => 'Tidsplan "breakline" for Lørdag "breakline" er ændret, og tilgængelig online og I sekretariatet !',
          'targetUrl' => 'wonderpush://notificationOpen/noop',
        ],
      ]),
)));

$rawResponse = curl_exec($ch);

if (curl_errno($ch)) {

    echo 'Error: ' . curl_error($ch);

} else {

    $response = json_decode($rawResponse, true);
    if (isset($response['success']) && $response['success'] === true) {
        echo '<div style="background-color: green;color: white; width: 100%;height: 100%;padding: 0;">Push besked M114 afsendt, uden fejl...!</div>';
    } else if (isset($response['error']['status'])
               && isset($response['error']['code'])
               && isset($response['error']['message'])) {
        echo '<div style="background-color: red; color: white;width: 100%;height: 100%;padding: 0;">Error ' . $response['error']['status']
          . ' code ' . $response['error']['code']
          . ': ' . $response['error']['message'];
    } else {
        echo 'Error: </div>' . $rawResponse;
    }

}

curl_close($ch);

Hi Michael,

Simply use the \n character to add a plain newline.
HTML is not supported in notifications, it’s only plain text.

// Please not the use of double quotes instead of single quotes.
// Newlines:       ↓↓          ↓↓
'text' => "Tidsplan\nfor Lørdag\ner ændret, og tilgængelig online og I sekretariatet !",

Best,