Apple Message for Business: Text with Attachments

A text message with unicode object replacement character (\\uFFFC) at the text position where the attachment should appear in the message text. Note: The following is an example of Text with Multiple Attachments. Examples of other Text Attachment types can be found below. Note: Modify YourRegion in the URL to the right to reflect your tenant’s region. See Know your endpoint page.

📘

Note

Please use URL-friendly file names for attachments, and avoid using special characters such as “+” in file names.

Other Text Attachments

{
    "deliverychannel": "AppleBusinessChat",
    "appid": "{{ambAppid}}",
    "destination": [
        {
            "abcUserId": [
                "{{abcUserId}}"
            ]
        }
    ],
    "channels": {
        "AppleBusinessChat": {
            "type": "text",
            "text": "\\uFFFC",
            "attachments": [
                {
                    "url": "https://sample-videos.com/doc/Sample-doc-file-100kb.doc",
                    "mimeType": "application/msword",
                    "name": "Sample-doc-file-100kb.doc",
                    "size": "102400"
                }
            ]
        }
    },
    "correlationid": "",
    "callbackData": "",
  "notifyurl": "",
"notifyurlAuthId": "TNPBXKT09U" //Optional.
}
{
    "deliverychannel": "AppleBusinessChat",
    "appid": "{{ambAppid}}",
    "destination": [
        {
            "abcUserId": [
                "{{abcUserId}}"
            ]
        }
    ],
    "channels": {
        "AppleBusinessChat": {
            "type": "text",
            "text": " Aravindha Sametha Veera Raghava \\uFFFC",
            "attachments": [
                {
                    "url": "https://stgrtmedia.s3.amazonaws.com/re04101516/30341916739262892.mp4",
                    "mimeType": "video/mp4"
                }
            ]
        }
    },
    "correlationid": "",
    "callbackData": "",
    "notifyurl": "",
   "notifyurlAuthId": "TNPBXKT09U" //Optional.
}
{
    "deliverychannel": "AppleBusinessChat",
    "appid": "{{ambAppid}}",
    "destination": [
        {
            "abcUserId": [
                "{{abcUserId}}"
            ]
        }
    ],
    "channels": {
        "AppleBusinessChat": {
            "type": "text",
            "text": " Attachment1 \\uFFFC Attachment2  \\uFFFC Attachment3 \\uFFFC Attachment4  \\uFFFC Attachment5  \\uFFFC Attachment6 \\uFFFC Attachment7 \\uFFFC Attachment8 \\uFFFC Attachment9 \\uFFFC Attachment10 \\uFFFC",
            "attachments": [
                {
                    "url": "https://timesofindia.indiatimes.com/videos/entertainment/music/telugu/aravindha-sametha-song-reddamma-thalli/videoshow/66349017.cms",
                    "mimeType": "application/pdf"
                },
                {
                    "url": "https://www.livemint.com/rf/Image-621x414/LiveMint/Period2/2016/08/23/Photos/Processed/[email protected]",
                    "mimeType": "image/jpeg"
                },
                {
                    "url": "http://file-examples.com/index.php/sample-audio-files/sample-mp3-download/",
                    "mimeType": "application/pdf"
                },
                {
                    "url": "http://www.africau.edu/images/default/sample.pdf",
                    "mimeType": "image/jpeg"
                }
            ]
        }
    },
    "correlationid": "",
    "callbackData": "",
    "notifyurl": "",
    "notifyurlAuthId": "TNPBXKT09U" //Optional.
}

Common Parameters for other text attachment types

Parameter/ObjectParameter within the ObjectMandatoryDescription
delivery channelChannel used to send the message i.e., Apple Messages for Business in this case.
app idYesContains the applicationid
destinationUser's Opaque ID that uniquely identifies a user and is specific to the business
abcUserIdUnique user ID
correlationidThe corrrelationid is a unique identifier that you can attach to every request as a reference a particular transaction or event. This is configured as a part of the request.
callbackDataData that you have configured to receive on the notify Url. This is configured as a part of the request.
notifyurlConfigure a URL to get notifications on delivery reports for a WhatsApp message. This field accepts only a valid URL or a variable. If an invalid URL is passed in API request or via a variable, then such request will not be considered eligible for retries.
notifyurlAuthIdstringNoUnique Authentication ID.

📘

Note

It is recommended to use a valid authorization ID; the failure of notification won’t be logged in Debug Logs.

The notify URL should be filled with the proper URL format; otherwise, it would be considered an invalid URL.

The notify URL should be provided with proper spacing of the URL; when space is provided in front of the URL or at the end of the URL, it would be considered an invalid URL.

Additional details for the various text attachment types:

Text with attachment-PDF

Parameter/ObjectParameter within the ObjectMandatoryDescription
channels
AppleBusinessChatJSON object for AppleBusinessChat configuration.
typeYesOptions: text, richlink, interactive
textYesThe text of the text message, which can contain URLs and formatting
attachmentsNoContains the attachment object
urlYesPublicly accessible URL that is a direct link to the media
mimeTypeYesThe MIME type
namename of the attachment
sizesize of the attachment
conversationid

Text with attachment-.mp4

Parameter/ObjectParameter within the ObjectMandatoryDescription
channels
AppleBusinessChatJSON object for AppleBusinessChat configuration.
typeYesOptions: text, richlink, interactive
textYesThe text of the text message, which can contain URLs and formatting
attachmentsNoContains the attachment object
urlYesPublicly accessible URL that is a direct link to the media
mimetypeYesThe MIME type

Text with attachment-Different fles(Image,Video and audio)

Parameter/ObjectParameter within the ObjectMandatoryDescription
channels
AppleBusinessChatJSON object for AppleBusinessChat configuration.
typeYesOptions: text, richlink, interactive
textYesThe text of the text message, which can contain URLs and formatting
attachmentsNoContains the attachment object
urlYesPublicly accessible URL that is a direct link to the media
mimetypeYesThe MIME type

Error Codes

Refer to the Apple Messages for Business section.

Language
URL
Click Try It! to start a request and see the response here!