php mautic chanel营销信息

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php mautic chanel营销信息相关的知识,希望对你有一定的参考价值。

<?php
$messageApi = $api->newApi("messages", $auth, $apiUrl);

//Get an individual marketing message by ID.
$message = $messageApi->get($id);

//LIST MARKETING MESSAGES
$messages = $messageApi->getList($searchFilter, $start, $limit, $orderBy, $orderByDir, $publishedOnly, $minimal);

//Create a new message.
$data = array(
    'name'        => 'Marketing Message A',
    'description' => 'This is my first message created via API.',
    'isPublished' => 1,
    'channels' => array(
        'email' => array(
            'channel' => 'email',
            'channelId' => 44,
            'isEnabled' => true,
        ),
        'sms' => array(
            'channel' => 'sms',
            'channelId' => 1,
            'isEnabled' => true,
        ),
        'notification' => array(
            'channel' => 'notification',
            'channelId' => 75,
            'isEnabled' => false,
        )
    )
);

$message = $messageApi->create($data);

//Edit a new message
$id   = 1;
$data = array(
    'name'        => 'New message title',
    'isPublished' => 0
);

$createIfNotFound = true; // Create new a message of ID 1 is not found?
$message = $messageApi->edit($id, $data, $createIfNotFound);

//Delete a message.
$message = $messageApi->delete($id);

以上是关于php mautic chanel营销信息的主要内容,如果未能解决你的问题,请参考以下文章

php mautic短信

php mautic动态内容

php mautic类别

php Mautic运动

php mautic API - 联系

PHP:使用 OAuth1a 调用 Mautic API