> ## 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 single message
> Sends a prepared message as a single message to a specific user.
This method automatically adds the user who receives the email to the group of the prepared message.
Attachments can be encoded using base64encode.org.
Request body example:
{
"parameters":
[{"name" : "Parameter Name 1","value" : "Parameter Value 1"},
{"name" : "Parameter Name 2","value": "Parameter Value 2"}],
"attachments":
[{"name" : "image.png",
"contentType" : "application.png",
"content" : "BASE64ENCODING"}]
}
## OpenAPI
````json POST /message/sendSingle
{
"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/sendSingle": {
"post": {
"tags": [
"Message"
],
"summary": "Send a single message",
"description": "Sends a prepared message as a single message to a specific user. {
\"parameters\":
[{\"name\" : \"Parameter Name 1\",\"value\" : \"Parameter Value 1\"},
{\"name\" : \"Parameter Name 2\",\"value\": \"Parameter Value 2\"}],
\"attachments\":
[{\"name\" : \"image.png\",
\"contentType\" : \"application.png\",
\"content\" : \"BASE64ENCODING\"}]
}",
"operationId": "sendSingle",
"parameters": [
{
"name": "messageId",
"in": "query",
"description": "ID of the message",
"schema": {
"type": "integer",
"format": "int64"
}
},
{
"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 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"
}
}
}
}
}
}
````