> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mapp.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Send a transactional message
> Sends a prepared message as a transactional message, and adds user as member to group the prepared message belong to.
Please be aware this may cause that user to be unexpectedly subscribed or re-subscribed to that group.
Attachments may be added as part of the JSON payload. If you wish to attach a file to the message, the data must be Base64 encoded
and added as the value of the attachment’s content string, as demonstrated below. Request body example with attachment:
{
"parameters":
[{"name" : "Parameter Name 1","value" : "Parameter Value 1"},
{"name" : "Parameter Name 2","value": "Parameter Value 2"}],
"attachments":
[{"name" : "twitter_logo.png",
"contentType" : "image/png",
"content": "iVBORw0KGgoAAAANSUhEUgAAABUAAAARCAYAAAAyhueAAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAASFJREFUeNqslM0NgkAQhRdiAdiAgQ6468EO1INntQOpwFABdqBe9aAdiIl3twS1AbECfJPMkhVZftSXjJPsDh87z2WsNE1Fb3d3z+POVVQIdQ5ShJhqywdEgEgQQ1qwutsbFT4QM4DXFcALwi3YJqDD2bPx4/PGCg/OSw46NwAFA0nU7d7ObUYAHxF+wYMDUU8jiz19aG9TihEbyuS3oSavNmoT5Sm1thA/CkCLsvJ0In5XdnsIKkv+gCaSGZQ8QF7+AXrST0peBH8Ar9+grKfuS1Mgd/wBjb/0lmChvmBr14GgMy5qoiA/N+zcPSNfPN2fCoVF86KlDQxqvc93tl8DaBxALcAi/qLqKuaWpalAffsOz8iB4ZRSzYIymNJLgAEAYsJkJOLW//gAAAAASUVORK5CYII="}]
}
## OpenAPI
````json POST /message/sendTransactional
{
"openapi": "3.0.4",
"info": {
"title": "Engage public API",
"version": "1"
},
"servers": [
{
"url": "https://your-engage-domain.com/api/rest"
}
],
"tags": [
{
"name": "Address Attributes"
},
{
"name": "Async"
},
{
"name": "Audit Log"
},
{
"name": "Automation"
},
{
"name": "Blacklist"
},
{
"name": "CMS"
},
{
"name": "Contact"
},
{
"name": "Content"
},
{
"name": "Coupon"
},
{
"name": "Draft Message"
},
{
"name": "Ecommerce"
},
{
"name": "Group"
},
{
"name": "Group Attributes"
},
{
"name": "Landing Page"
},
{
"name": "Member Attributes"
},
{
"name": "Membership"
},
{
"name": "Message"
},
{
"name": "Meta"
},
{
"name": "Mobile Push"
},
{
"name": "Prepared Message"
},
{
"name": "Process"
},
{
"name": "Profile Attributes"
},
{
"name": "Related Data"
},
{
"name": "Segmentation"
},
{
"name": "System"
},
{
"name": "System User"
},
{
"name": "Usage Statistics"
},
{
"name": "User"
},
{
"name": "Whiteboard"
}
],
"paths": {
"/message/sendTransactional": {
"post": {
"tags": [
"Message"
],
"summary": "Send a transactional message",
"description": "Sends a prepared message as a transactional message, and adds user as member to group the prepared message belong to. {
\"parameters\":
[{\"name\" : \"Parameter Name 1\",\"value\" : \"Parameter Value 1\"},
{\"name\" : \"Parameter Name 2\",\"value\": \"Parameter Value 2\"}],
\"attachments\":
[{\"name\" : \"twitter_logo.png\",
\"contentType\" : \"image/png\",
\"content\": \"iVBORw0KGgoAAAANSUhEUgAAABUAAAARCAYAAAAyhueAAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAASFJREFUeNqslM0NgkAQhRdiAdiAgQ6468EO1INntQOpwFABdqBe9aAdiIl3twS1AbECfJPMkhVZftSXjJPsDh87z2WsNE1Fb3d3z+POVVQIdQ5ShJhqywdEgEgQQ1qwutsbFT4QM4DXFcALwi3YJqDD2bPx4/PGCg/OSw46NwAFA0nU7d7ObUYAHxF+wYMDUU8jiz19aG9TihEbyuS3oSavNmoT5Sm1thA/CkCLsvJ0In5XdnsIKkv+gCaSGZQ8QF7+AXrST0peBH8Ar9+grKfuS1Mgd/wBjb/0lmChvmBr14GgMy5qoiA/N+zcPSNfPN2fCoVF86KlDQxqvc93tl8DaBxALcAi/qLqKuaWpalAffsOz8iB4ZRSzYIymNJLgAEAYsJkJOLW//gAAAAASUVORK5CYII=\"}]
}",
"operationId": "sendTransactional",
"parameters": [
{
"name": "messageId",
"in": "query",
"description": "ID of the message or prepared message",
"schema": {
"type": "integer",
"format": "int64"
}
},
{
"name": "externalTransactionFormula",
"in": "query",
"description": "External transactional identifier. If not available, \"null\" can be used.",
"schema": {
"type": "string"
}
},
{
"name": "recipientId",
"in": "query",
"description": "ID of the user",
"schema": {
"type": "integer",
"format": "int64"
}
},
{
"name": "senderProfileName",
"in": "query",
"description": "TLS sender profile. Requires a Feature Switch and setting up a profile name in Mapp Engage. (optional)",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageContent"
}
}
},
"x-bodyName": "body"
},
"responses": {
"204": {
"description": "",
"content": {
"application/octet-stream": {}
}
},
"400": {
"description": "Missing parameter (messageId/recipientId) or parameter value, for example:{
\"errorActor\": \"CLIENT\",
\"errorCode\": \"MISSING_PARAMETER\",
\"message\": \"Parameter 'messageId' is mandatory but no value was specified.\",
\"parameterName\": \"messageId\",
\"propertyName\": null,
\"value\": \"null\"
}{
\"errorActor\": \"CLIENT\",
\"errorCode\": \"NO_SUCH_OBJECT\",
\"message\": \"Message with id=24011454555 does not exist.\",
\"objectType\": \"Message\",
\"propertyName\": \"id\",
\"propertyValue\": \"24011454555\"
}",
"content": {
"application/octet-stream": {}
}
}
}
}
}
},
"components": {
"schemas": {
"MessageContent": {
"type": "object",
"properties": {
"parameters": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Attribute"
}
},
"attachments": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Attachment"
}
}
}
},
"Attribute": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"Attachment": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"contentType": {
"type": "string"
},
"content": {
"type": "string"
}
}
}
}
}
}
````