- Overview
- Introduction
- Hosts
- Global Headers
- Common HTTP Error Codes
- API Permits
- Authorization
- API Contexts
- Common Concepts
- Common Models
- Reference
- API Structure
- Public API
- Introduction
- Loyalty Club
- Member
- Offers
- Rewards
- Games
- CMS Content
- Management API
- Introduction
- Core
- Applications
- Privacy Policy
- Cookie Policy
- Terms
- Domains
- Domain Email Configs
- Domain Web Configs
- TLS Certificates
- Links
- Fonts
- Subunits
- Subunits Scopes
- SMS Sender Identities
- Contacts
- Translations
- Promotions Policy
- Tracker
- Social Logins
- Billing
- Members
- Listing Members
- Member Profile
- Imports
- Groups
- Programs
- Benefits
- Cars
- Webhooks
- Misc
- Receipts
- Stores
- Offers
- Rewards
- Triggerer
- CMS
- Introduction
- Pages
- Components
- Website
- Website Domains
- Venue Info
- Landing Pages
- Landing Page Templates
- Articles
- Events
- Events Groups
- Job Postings
- Press Releases
- Tags
- Service Messages
- Content Prototypes
- ContentPrototype Model
- List Content Prototypes
- Show Content Prototype
- Create Content Prototype
- Update Content Prototype
- Destroy Content Prototype
- List Organization Content Prototypes
- Show Organization Content Prototype
- Create Organization Content Prototype
- Update Organization Content Prototype
- Destroy Organization Content Prototype
- Mixed Content
- Attachments
- Events
- Games
- Scraper
- Files
- Receipts
- Users API
- Operations API
- Introduction
- Manager API
- Tenant API
- Messaging API
- Introduction
- Models
- Messages
- Sendings
- Templates
- Settings
- Sender Identities
- Messaging History
- Data API
- ML API
- Introduction
- Predict Sending KPI v1
- Explain Sending KPI Prediction v1
- Predict Sending KPI In Date Range v1
- Predict Sending Popularity v2
- Predict Sending Text Popularity v2
- Predict Sending Time Series Popularity v2
- Explain Sending Popularity Prediction v2
- Explain Sending Text Popularity Prediction v2
- Explain Sending Time Series Popularity Prediction v2
- Recommend sending time v2
- Generate Image
- Generate Text
- Generate Sending Text
- (Draft) Reporting API
- Other
Create Message
Pending
POST
https://api.mpc.dev.placewise.com/v1/messages/{service}
API Permit:Messages:Api:Messages:Create
API Context:Loyalty Club
Authorizations:UserToken
URL Parameters#
Key | Type | Description |
---|---|---|
service | string | Service |
Body Parameters#
Key | Type |
---|---|
message | MessagePayload |
Response Body#
Key | Type | Description |
---|---|---|
message | Message | See: Message model |
Error Responses#
Status | Description |
---|---|
403 | Unauthorized to set specific Service |
403 | Unauthorized to set Sending priority |
422 | Invalid parameters - see Invalid parameters errors model |
Example#
{
"message": {} // Message - see 'Message model'
}
Request
Path Params
service
string
required
Example:
generic
Header Params
X-Client-Authorization
string
optional
Default:
{{API_TOKEN}}
Body Params application/json
object {0}
Example
{
"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"
}
}
]
}
}
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
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"
}
}
]
}
}
}'
Responses
🟢200Success
application/json
Body
object {0}
Example
{}
Modified at 2025-01-28 13:05:39