用戶推播

用戶推播有兩種方式可以使用,依據使用環境來選擇適用的推播

Send broadcast message

post

Send broadcast messages to customers

Authorizations
AuthorizationstringRequired

Bearer token for API authentication

Query parameters
botIdstringRequired

The bot ID for the API request

Body

Additional validation rules:

  • Either intentId or message must be provided (cannot both be empty)
  • fbTag is required when platform is 'facebook'
secretstringRequired

Secret key for API authentication

Example: your_secret_key_here
intentIdstringOptional

Intent identifier for the broadcast (required if message is empty)

Example: VolejRejN
messagestringOptional

Message content to broadcast (required if intentId is empty)

Example: Hello, this is a broadcast message
clientIdsstring[]Optional

Array of platform UUIDs to send the broadcast to

Example: ["client_1","client_2","client_3"]
platformstring · enumRequired

Platform to send the broadcast on (required)

Example: linePossible values:
fbTagstringOptional

Facebook tag for the broadcast (required when platform is 'facebook')

Example: ACCOUNT_UPDATE
Responses
200

Broadcast sent successfully

application/json
post
/openapi/broadcast
POST /api/openapi/broadcast?botId=text HTTP/1.1
Host: mantago.cc
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 193

{
  "secret": "your_secret_key_here",
  "intentId": "VolejRejN",
  "message": "Hello, this is a broadcast message",
  "clientIds": [
    "client_1",
    "client_2",
    "client_3"
  ],
  "platform": "line",
  "fbTag": "ACCOUNT_UPDATE"
}
{
  "success": true,
  "message": "Send customer broadcast successfully"
}

Last updated