Placewise API
Get startedExplore
Get startedExplore
Performance Cloud 🗗
Placewise 🗗
ExplorePublic APIManagement APIUsers APIOperations APIMessaging APIReporting APIML API
Data API
ExplorePublic APIManagement APIUsers APIOperations APIMessaging APIReporting APIML API
Data API
  1. ML API
  • Introduction
  • Predict Sending KPI v1
    POST
  • Explain Sending KPI Prediction v1
    POST
  • Predict Sending KPI In Date Range v1
    POST
  • Predict Sending Popularity v2
    POST
  • Predict Sending Text Popularity v2
    POST
  • Predict Sending Time Series Popularity v2
    POST
  • Explain Sending Popularity Prediction v2
    POST
  • Explain Sending Text Popularity Prediction v2
    POST
  • Explain Sending Time Series Popularity Prediction v2
    POST
  • Recommend sending time v2
    POST
  • Detect receipt fraud
    POST
  • Predict item classes
    POST
  • Generate Image
    POST
  • Generate Image Caption
    POST
  • Generate Text
    POST
  • Generate Sending Text
    POST
  1. ML API

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:User
Generates sending text.

Body Parameters#

ParameterTypeRequired?Description
aboutStringyesWhat about the text should be.
include_keywordsArray[String]yesKeywords that should be included.
word_limitIntegeryesText limit in words.
toneStringyesTone of the text, e.g engaging, emotional.
occasionStringyesOccasion of sending, e.g christmas, valentines
variationStringyesHow varied should text be, options: none, medium, high
target_languageStringyesLanguage in ISO format, e.g. pl, en.
Parameters like: 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

Body Params application/json

Example
{
    "about": "string",
    "include_keywords": [
        "string"
    ],
    "word_limit": 0,
    "tone": "string",
    "occasion": "string",
    "variation": "none",
    "target_language": "string"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C#
Ruby
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 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
    "about": "string",
    "include_keywords": [
        "string"
    ],
    "word_limit": 0,
    "tone": "string",
    "occasion": "string",
    "variation": "none",
    "target_language": "string"
}'

Responses

🟢200Success
application/json
Body

Example
{}
Previous
Generate Text
Built with