- 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
- Data API
- ML API
- Introduction
- Predict Sending KPI v1POST
- Explain Sending KPI Prediction v1POST
- Predict Sending KPI In Date Range v1POST
- Predict Sending Popularity v2POST
- Predict Sending Text Popularity v2POST
- Predict Sending Time Series Popularity v2POST
- Explain Sending Popularity Prediction v2POST
- Explain Sending Text Popularity Prediction v2POST
- Explain Sending Time Series Popularity Prediction v2POST
- Recommend sending time v2POST
- Generate ImagePOST
- Generate TextPOST
- Generate Sending TextPOST
- (Draft) Reporting API
- Other
Generate Sending Text
POST
https://api.mpc.dev.placewise.com/v1/ml/sending/generate_text
API Permit:ML:SendingTextGeneration:Post
API Context:Loyalty Club
Authorizations:UserToken
Body Parameters#
Parameter | Type | Required? | Description |
---|---|---|---|
about | String | yes | What about the text should be. |
include_keywords | Array[String] | yes | Keywords that should be included. |
word_limit | Integer | yes | Text limit in words. |
tone | String | yes | Tone of the text, e.g engaging , emotional . |
occasion | String | yes | Occasion of sending, e.g christmas , valentines |
variation | String | yes | How varied should text be, options: none , medium , high |
target_language | String | yes | Language in ISO format, e.g. pl , en . |
about
, include_keywords
(Array[String]), occasion, can be in any language supported by deepl.(https://www.deepl.com/docs-api/translate-text/). Each parameter will be translated from
target_language
to en
to build full prompt in English.After that we concatenate the prompt as follows:
PROMPT + 'Use {target_language} language.'
.Where
target_language
(in ISO format) will me mapped to target_language in full name format e.g pl -> Polish...
Example#
When successful, returns:
{
'sending_text_generation_task': {
'id': 1
}
}
Request
Header Params
X-Loyalty-Club-Slug
stringÂ
required
Default:
{{LOYALTY_CLUB_SLUG}}
X-Client-Authorization
stringÂ
optional
Default:
{{API_TOKEN}}
Body Params application/json
about
stringÂ
required
include_keywords
array[string]Â |Â nullÂ
required
word_limit
integerÂ
required
tone
stringÂ
required
occasion
string  | nullÂ
required
variation
enum<string>Â
required
Allowed values:
nonemediumhigh
target_language
stringÂ
required
Example
{
"about": "string",
"include_keywords": [
"string"
],
"word_limit": 0,
"tone": "string",
"occasion": "string",
"variation": "none",
"target_language": "string"
}
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/ml/sending/generate_text' \
--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 ''
Responses
🟢200Success
application/json
Body
object {0}
Example
{}
Modified at 2025-04-14 10:45:11