Send Push Message
You can use the HTTP API to send API-triggered Push Message campaigns.
Authentication is performed using the SDK Key.
Add the SDK Key to the HTTP header as shown below.
You can find the SDK Key in the Hackle Dashboard under SDK Integration Info.
X-HACKLE-API-KEY: {YOUR_SERVER_SDK_KEY}Request
POST https://api.hackle.io/v1/push-message/trigger/sendRequest Body
campaignKey
number
O
Campaign Key for the Push Message
users
array<User object>
O
List of users to receive the message
Maximum number of users cannot exceed 50.
User Object
userId
string
X
User ID (Hackle ID can be used)
deviceId
string
X
Device ID (Hackle ID can be used)
apiProperties
object
X
Key-value pairs used for Push Message personalization. key(string)-value(string)
Example
Response
The API returns a Success Response or Error Response object as the result of the send request.
Success (200)
dispatchId
string
Unique UUID for the Push Message request triggered by the API
message
string
Contains the value "success".
example
Error
code
string
A specific response error code
message
string
A message describing the error
example
error case
401
INVALID_API_KEY
"Invalid API key"
When an invalid API KEY is included in the header
401
API_KEY_NOT_FOUND
"API key not found"
When no API KEY is included in the header
400
EXCEED_USER_MAX_LENGTH
"Max input length exceeded"
When the maximum number of target users that can be sent at once is exceeded
400
CAMPAIGN_NOT_FOUND
"Could not find push message campaign with the given key"
When no API-triggered campaign exists matching the given campaign key
400
EMPTY_IDENTIFIER
"At least one identifier should be given"
When neither userId nor deviceId is present in the target user info for the push send
Last updated