post https://api.{YourRegion}.webexconnect.io/resources/v1/messaging/
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.
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": ""
}
{
"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": ""
}
{
"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": ""
}
Common Parameters for other text attachment types
Parameter/Object | Parameter within the Object | Mandatory | Description |
---|---|---|---|
delivery channel | Channel used to send the message i.e., Apple Messages for Business in this case. | ||
app id | Yes | Contains the applicationid | |
destination | User's Opaque ID that uniquely identifies a user and is specific to the business | ||
abcUserId | Unique user ID | ||
correlationid | The 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. | ||
callbackData | Data that you have configured to receive on the notify Url. This is configured as a part of the request. | ||
notifyurl | Configure 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. |
Additional details for the various text attachment types:
Text with attachment-PDF
Parameter/Object | Parameter within the Object | Mandatory | Description |
---|---|---|---|
channels | |||
AppleBusinessChat | JSON object for AppleBusinessChat configuration. | ||
type | Yes | Options: text, richlink, interactive | |
text | Yes | The text of the text message, which can contain URLs and formatting | |
attachments | No | Contains the attachment object | |
url | Yes | Publicly accessible URL that is a direct link to the media | |
mimeType | Yes | The MIME type | |
name | name of the attachment | ||
size | size of the attachment | ||
conversationid |
Text with attachment-.mp4
Parameter/Object | Parameter within the Object | Mandatory | Description |
---|---|---|---|
channels | |||
AppleBusinessChat | JSON object for AppleBusinessChat configuration. | ||
type | Yes | Options: text, richlink, interactive | |
text | Yes | The text of the text message, which can contain URLs and formatting | |
attachments | No | Contains the attachment object | |
url | Yes | Publicly accessible URL that is a direct link to the media | |
mimetype | Yes | The MIME type |
Text with attachment-Different fles(Image,Video and audio)
Parameter/Object | Parameter within the Object | Mandatory | Description |
---|---|---|---|
channels | |||
AppleBusinessChat | JSON object for AppleBusinessChat configuration. | ||
type | Yes | Options: text, richlink, interactive | |
text | Yes | The text of the text message, which can contain URLs and formatting | |
attachments | No | Contains the attachment object | |
url | Yes | Publicly accessible URL that is a direct link to the media | |
mimetype | Yes | The MIME type |
Error Codes
Refer to the below page https://developers.imiconnect.io/reference/channel-specific-status-codes-1#apple-messages-for-business