Docs › API Reference › Communication Service › POST /communication/push
POST /communication/push
Send push notification to all active devices of a specified user. Supports filtering target devices by platform (iOS/Android/Web/Desktop), automatically records success/failure for each token. References: ePrivacy Directive 2002/58/EC, CAN-SPAM Act.
Communication Service `bearerAuth` application/json
Request Body
Schema: dto.PushRequest
Field Type Required Example Constraints Description
body
string
Yes
You have a new message.
Content
title
string
Yes
New message notification
Title
user_id
string
Yes
usr_abc123
User ID
channel
string
No
ios
Channel
data
object
No
Data
device_token
string
No
device_token_xxx
Device token
platform
string
No
all
enum: `all`, `ios`, `android`, `web`, `desktop`
Platform
Referenced Schemas
dto.PushResultDetailResponse
Field Type Required Example Constraints Description
code
integer
No
data
dto.PushResultResponse
No
message
string
No
timestamp
string
No
dto.PushResultResponse
Push sending result
Field Type Required Example Constraints Description
sent
boolean
No
True
tokens_failed
integer
No
0
tokens_sent
integer
No
2
dto.SimpleResponse
Field Type Required Example Constraints Description
code
integer
No
message
string
No
timestamp
string
No