Gửi Facebook Marketing Message
Request
1. Gửi loại Mẫu tin cơ bản (creative)
creative)curl --location 'https://vpage.open.nhanh.vn/v3.0/marketing/fmmcampaigncreate?appId={{appId}}&businessId={{businessId}}' \
--header 'Authorization: {{accessToken}}' \
--header 'Content-Type: application/json' \
--data '{
"campaign": {
"pageId": "167890463074771",
"adAccountId": "act_962587495564547",
"segmentIds": [
"120246391779940373",
"I_pgtJ0Bq4rJK0SlQsHD"
],
"name": "Chiến dịch Mẫu tin cơ bản",
"budget": 100000,
"budgetType": "life_time",
"adStartAt": 1790000000,
"adEndAt": 1790086400,
"type": "creative"
},
"settings": {
"noResendWithinDays": 7,
"excludes": {
"topicsIds": [],
"audienceIds": [],
"campaignIds": []
}
},
"message": {
"greeting": "Xin chào {{first_name}}! Xem ngay các sản phẩm mới nhất của chúng tôi.",
"attachments": [
{
"imageHash": "63d13607cd76dc3fba71350751352d85",
"name": "Áo Khoác Nam Bomber",
"description": "Chất liệu phao ấm áp, thiết kế năng động trẻ trung.",
"link": "https://vpage.nhanh.vn/",
"buttons": [
{
"type": "URL",
"text": "Xem sản phẩm",
"url": "https://vpage.nhanh.vn/"
},
{
"type": "SCRIPT",
"text": "Trò chuyện trực tiếp",
"botId": "iTLPoJoBMexIgwsbLJX0",
"blockId": "DUMv6JoBMexIgwsbbyew"
}
]
},
{
"imageHash": "ba9785f4bf57867b772399507eaf9b93",
"name": "Quần Jeans Slimfit",
"description": "Co giãn tốt, giữ form dáng cực chuẩn.",
"link": "https://vpage.nhanh.vn/",
"buttons": [
{
"type": "URL",
"text": "Mua ngay",
"url": "https://vpage.nhanh.vn/"
}
]
}
]
}
}'2. Gửi loại Mẫu tin nâng cao (template)
template)3. Gửi danh sách sản phẩm (product)
product)4. Gửi Coupon / Voucher (coupon)
coupon)Cấu trúc chi tiết Parameters
campaign
Key
Type
Description
settings (tùy chọn)
Key
Type
Description
message
Key
Optional
Type
Description
attachments (Dành cho loại: creative, template)
creative, template)Key
Optional
Type
Description
attachments (Dành riêng cho loại: coupon)
coupon)Key
Optional
Type
Description
buttons (Trong card của attachments — loại creative, template)
creative, template)Key
Type
Description
quickReplies (Trong message — chỉ loại template)
template)Key
Type
Description
configCart (Tùy chọn — chỉ khi có nút CART)
CART)Key
Type
Description
Response
Failed response
errorCode
Description
Successful response
Last updated