Key | Type | Description |
---|---|---|
service | string | Service |
Key | Type |
---|---|
message | MessagePayload |
Key | Type | Description |
---|---|---|
message | Message | See: Message model |
Status | Description |
---|---|
403 | Unauthorized to set specific Service |
403 | Unauthorized to set Sending priority |
422 | Invalid parameters - see Invalid parameters errors model |
{
"message": {} // Message - see 'Message model'
}
{
"message": {
"name": "My message",
"channels": [
{
"type": "push",
"template": {
"type": "inline",
"definition": {
"type": "push",
"content": {
"subject": "Piotr Świtlicki",
"body": "Hi, I noticed some issues with the lighting in our store. Could maintenance take a look at it as soon as possible? [NOSIM]",
"image_url": "https://cdn-files.dev.placewise.com/files/DDJ199gDz22pUZwdy1MGX1lMtZF2UdWpCtBZPX52vvXAEL77o_k2puVV0CdcSvFxdDLxm8A1gQnlJYCPzCLiQbR63qXJZWBe1Vdhbi16TU1ETG5kUA?transform=resize%3Dheight%3A200%2Cfit%3Amax%2Fquality%3Dvalue%3A75%2Fcompress"
}
}
}
}
],
"sending": {
"schedule": {
"type": "immediate"
},
"recipients": [
{
"member_id": 48356145,
"properties": {
"first_name": "Piotr"
}
}
]
}
}
}
curl --location --request POST 'https://api.mpc.dev.placewise.com/v1/messages/generic' \
--header 'X-User-Agent;' \
--header 'X-Product-Name;' \
--header 'X-Loyalty-Club-Slug;' \
--header 'X-Customer;' \
--header 'Authorization;' \
--header 'X-Client-Authorization: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"message": {
"name": "My message",
"channels": [
{
"type": "push",
"template": {
"type": "inline",
"definition": {
"type": "push",
"content": {
"subject": "Piotr Świtlicki",
"body": "Hi, I noticed some issues with the lighting in our store. Could maintenance take a look at it as soon as possible? [NOSIM]",
"image_url": "https://cdn-files.dev.placewise.com/files/DDJ199gDz22pUZwdy1MGX1lMtZF2UdWpCtBZPX52vvXAEL77o_k2puVV0CdcSvFxdDLxm8A1gQnlJYCPzCLiQbR63qXJZWBe1Vdhbi16TU1ETG5kUA?transform=resize%3Dheight%3A200%2Cfit%3Amax%2Fquality%3Dvalue%3A75%2Fcompress"
}
}
}
}
],
"sending": {
"schedule": {
"type": "immediate"
},
"recipients": [
{
"member_id": 48356145,
"properties": {
"first_name": "Piotr"
}
}
]
}
}
}'
{}