- 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
- Branding
- Privacy Policy
- Cookie Policy
- Terms
- Domains
- Domain Email Configs
- Domain Web Configs
- TLS Certificates
- Links
- Fonts
- Subunits
- Subunits Scopes
- Contacts
- Translations
- Promotions Policy
- Tracker
- Social Logins
- Billing
- SMS Sender Identities
- Member Authentication Configuration
- Members
- Listing Members
- Member Profile
- Imports
- Groups
- Programs
- Benefits
- Cars
- Webhooks
- Misc
- Receipts
- Messages
- 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
- Sender Identities
- Messaging History
- General
- 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
- Detect Receipt Fraud
- Generate Image
- Generate Text
- Generate Sending Text
- (Draft) Reporting API
- Other
MessagePayload model
Example#
It creates an SMS message which will be sent at given time to members of given audience:
{
"name": "My message", "shorten_urls": true, "track_in_shortener": true, "campaign_id" : 32,
"channels": [
{
"type": "sms",
"sender": { "type": "alphanumeric", "value": "Infinity" },
"template": {
"type": "inline",
"data": { "type": "plain", "content": { "body": "Hi {{name}}" } }
}
}
],
"sending": {
"schedule": { "type": "absolute", "at": "2020-10-18T10:59:32.340Z" },
"audience": { "type": "reference", "id" : 15 }
}
}
Definition#
Key | Type | Description |
---|---|---|
name | string | |
shorten_urls | boolean | Should sendings for this message have URLs shortened? Default: true |
shorten_urls | boolean | Should MPC's Shortener track users? Default: false |
campaign_id | integer | MPC's Campaign ID |
channels | ChannelPayload[] | Channels the message should be sent with. |
sending | SendingPayload | Sending to schedule for the message, available only on creation |
Specific Validation Errors#
Attribute | Error key | Description |
---|---|---|
campaign_id | is_relevant_only_for_campaign_service | When campaign_id is given and service is not "campaigns" |
channels | types_must_be_unique | |
channels[].type | not_configured | Channel is not configured for Loyalty Club - see Messaging > Settings |
ChannelPayload model#
Example#
{
"type": "sms",
"sender": { "type": "alphanumeric", "value": "Infinity" },
"template": {
"type": "inline",
"data": { "type": "plain", "content": { "body": "Hi {{first_name}}" } }
}
}
Definition#
Key | Type | Description |
---|---|---|
type | enum: ['sms', 'email', 'push'] | |
template.type | enum: ['inline', 'reference'] | |
template.id | integer | ID of Template to assign (when reference ) |
template.definition | MessageTemplatePayload | Definition of Template to assign (when inline ) |
(channel-specific attributes) |
inline
- you will need provide new template definition
reference
- template definition will be copied from template identified by id
Specific Validation Errors#
Attribute | Error key |
---|---|
template.id | template_does_not_exist |
template.id | template_does_not_match_channel |
template.definition.type | template_does_not_match_channel |
template.definition.wrapper_id | template_does_not_match_channel |
MessageTemplatePayload model#
Example#
{
"type": "plain",
"wrapper_id": 9193,
"content": { "body": "Hi {{first_name}}" }
}
Definition#
Key | Type | Description |
---|---|---|
type | enum: ['plain', 'email', 'bee_email', 'push'] | |
content | Object | Depends on type. See: Template model |
wrapper_id | integer | ID of wrapping template |
Specific Validation Errors#
Attribute | Error key |
---|---|
wrapper_id | template_does_not_exist |
wrapper_id | wrapper_type_does_not_match |