Description
The Send Outbound Media API allows you to send Media files to a Hi Marley case from any system. The Send Outbound Media API allows carriers the flexibility in sending a media file as an embedded MMS or Hi Marley link via the attachmentType property.
| Service Name | Send Message |
| Service Type | REST |
| Method | POST |
| UAT (Sandbox) URL |
https://integration.uat.marley.ai/api/cases/:caseId/messages |
| Production URL | https://integration.himarley.io/api/cases/:caseId/messages |
| Technical Documentation | View technical documentation with sample request and response payloads hosted on Postman. |
API Request
Flow
- Send API Request with Hi Marley caseId path parameter and generated body payload from your system.
- Hi Marley receives requests and validate Request Payload elements (see request field breakdown)
- API response received with either success or error message based on validation. Success indicates that message will be processed and sent shortly.
- If source is set to an operator email, Hi Marley will modify case assignment based on the below logic:
- If case is unassigned, the indicated operator will be assigned as the primary contact.
- If case is assigned, the indicated operator will be assigned as a secondary operator.
- Hi Marley sends message to customer on the case using the specified source or as Marley (ai).
Supported Media Types:
- Image formats: PNG, JPEG, GIF
- Video format: MP4
- Audio format: MP4
- Text format: vCard
- Application formats: PDF, Microsoft Word (DOCX), Microsoft Excel (XLSX)
Request Example
https://integration.uat.marley.ai/api/cases/5da9589c-4f78-41f3-bc32-1da43f800021/messages
{
"attachmentType": "hosted",
"source": "<string> | <object>",
"data": "Base64-Encoded-String"
}
Request Field Breakdown
| Property | Values | Description |
Type |
Required | Example | Validation |
|
attachmentType |
hosted (send media as hosted Marley media link) |
Indication of how to send the media message. | enum |
true |
"attachmentType": "hosted" |
n/a |
| source | "ai" | The message will come from Marley. | string |
false |
"source": "ai" |
|
| "assigned" | The message will come from the Operator assigned to the Hi Marley case. | string |
false |
"source": "assigned" |
|
|
| operator account object | The message will come from a specific operator account. | object |
false |
"source":{"email":"jermeie.quinones@himarley.com"} |
|
|
| data | base64-encoded-string | MMS file size is 6MB. | base64-encoded-string |
true |
"data": "Base64-Encoded-String"
|
API Response
Response Payload Example
{
"messageId": "XXXXXX",
"deliveryStatus": "internalProcessing"
}
Response Fields Breakdown
| Property | Description | Data type | Example |
| messageId | The UUID generated for the message Media Message sent. | boolean |
"messageId": "6dcb5c1a-eba0-4d15-acb8-f74fd0215171" |
| deliveryStatus | Async media message process will always return internalProcessing. | enum | "deliveryStatus": "internalProcessing" |
Below are examples of a Send Outbound Media API from a sending system, & the corresponding message source.
Message with source = email
Message with source = assigned
Message with source = ai
Common Errors to Handle
- [404] Case Not Found - More Details
- [404] Primary Contact Not Found - More Details
Comments
0 comments
Please sign in to leave a comment.