APIs, tutorials, tools and reference for building with Melrose Labs CPaaS.
Documentation PortalWe provide comprehensive documentation, including API specifications, libraries, code samples for all the main languages, and details on the operation of services. We want to ensure you have whatever helps you make best use of our services.
If you have any questions, please email support@melroselabs.com or submit a support request.
Step-by-step guides with code samples in multiple languages.
Technical specifications and protocol documentation.
Tools to help you develop, test and integrate.
SMPP SMSC simulator to test SMS messaging applications. Generate MO SMS using Inbound MO SMS Tool or SMPP.
Tools for developers and operations teams building, deploying and maintaining applications that support SMS.
SMPP client for testing with SMS gateways and SMSCs from a web browser. Supports SMPP v3.3, v3.4 and v5.
SMPP client for testing with SMS gateways and SMSCs. Supports SMPP v3.3, v3.4, and v5. Available for macOS.
SMPP client for testing with SMS gateways and SMSCs. Supports SMPP v3.3, v3.4, and v5. Available for Windows.
SMPP compliance and performance testing of SMSCs, SMS gateways and apps. Version support and load testing.
Tools for developers and operations teams building, deploying and maintaining applications that support RCS.
Simulate RCS messaging between a chatbot and a chatbot server, and between a chatbot and a user's mobile.
Command-line tool for voice, messaging, video and identity APIs. (NPM )
REST APIs for SMS, rich messaging, RCS, Iridium satellite and more. Full reference documentation is on developers.melroselabs.com.
Get an API key for use with our voice, messaging, video and identity APIs.
SIGN-UP | LOGIN TO GET API KEYOur service documentation for developers provides indepth documentation on each of our services, including quickstart guides, tutorials, code samples, configuration examples and technical descriptions.
REST API documentation can be found at Rich Messaging API - Cards
Create a card using a template and get URL of new card.
Request:
curl https://api.melroselabs.com/richmessaging/card/ \
--header 'x-api-key: [API_KEY]' --header 'Content-Type: application/json' \
--data-raw '{"templateref":"10","data":{"propertyname":"Santorini Escape","urlimage":"https://richmsg.io/media/images/seaview-apartments.png","propertysummary":"A luxurious two-bedroom apartment with the best views over Santorini.","urldetails":"https://melroselabs.com/services/rich-messaging/","urlbooknow":"https://melroselabs.com/services/rich-messaging/"},"userref":"","callback":"","expires":""}'Response:
{ "messageID": "lpB", "shortURL": "https://richmsg.io/lpB" }Request:
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://api.melroselabs.com/richmessaging/card/',
'headers': {
'x-api-key': '[API_KEY]',
'Content-Type': 'application/json'
},
body: JSON.stringify({"templateref":"10","data":{"propertyname":"Santorini Escape","urlimage":"https://richmsg.io/media/images/seaview-apartments.png","propertysummary":"A luxurious two-bedroom apartment with the best views over Santorini.","urldetails":"https://melroselabs.com/services/rich-messaging/","urlbooknow":"https://melroselabs.com/services/rich-messaging/"},"userref":"","callback":"","expires":""})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body); // response is of type application/json
});Response:
{ "messageID": "lpB", "shortURL": "https://richmsg.io/lpB" }Request:
import requests
import json
url = "https://api.melroselabs.com/richmessaging/card/"
payload = {
{"templateref":"10","data":{"propertyname":"Santorini Escape","urlimage":"https://richmsg.io/media/images/seaview-apartments.png","propertysummary":"A luxurious two-bedroom apartment with the best views over Santorini.","urldetails":"https://melroselabs.com/services/rich-messaging/","urlbooknow":"https://melroselabs.com/services/rich-messaging/"},"userref":"","callback":"","expires":""}
}
headers = {
'x-api-key': '[API_KEY]',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data = json.dumps(payload))
# response is of type application/json
print(response.text.encode('utf8'))
Response:
{ "messageID": "lpB", "shortURL": "https://richmsg.io/lpB" }Request:
<?php
$data = {"templateref":"10","data":{"propertyname":"Santorini Escape","urlimage":"https://richmsg.io/media/images/seaview-apartments.png","propertysummary":"A luxurious two-bedroom apartment with the best views over Santorini.","urldetails":"https://melroselabs.com/services/rich-messaging/","urlbooknow":"https://melroselabs.com/services/rich-messaging/"},"userref":"","callback":"","expires":""}
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.melroselabs.com/richmessaging/card/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $data,
CURLOPT_HTTPHEADER => array(
"x-api-key: [API_KEY]",
"Content-Type: application/json"
)
));
$response = curl_exec($curl);
curl_close($curl);
echo $response; // response is of type application/json
?>
Response:
{ "messageID": "lpB", "shortURL": "https://richmsg.io/lpB" }The following card templates can be used with Rich Messaging API - Cards
Property lettings card used to promote a property.
propertynameName of the property being let.
urlimageURL of the image to be displayed on the card. Image should be under 2MB.
propertysummaryA brief description of the property.
urldetailsURL of web page with more details on the property.
urlbooknowURL of web page where property can be booked.
{
"propertyname": "Santorini Escape",
"urlimage": "https://richmsg.io/media/images/seaview-apartments.png",
"propertysummary": "A luxurious two-bedroom apartment with the best views over Santorini.",
"urldetails": "https://melroselabs.com/services/rich-messaging/",
"urlbooknow": "https://melroselabs.com/services/rich-messaging/"
}Property for sale card.
statusStatus of the property sale (e.g. FOR SALE).
propertynameName of the property being sold.
urlimageURL of image of the property.
priceSale price of property
propertysummaryA brief description of the property.
propertydescriptionA long description of the property.
urldetailsURL of web page with more details on the property.
urlarrangeviewingURL of web page where property viewing can be arranged.
{
"status": "FOR SALE",
"urlimage": "https://richmsg.io/media/images/propertyforsale.jpeg",
"urlarrangeviewing": "https://abc.com",
"urldetails": "https://abc.com",
"propertyname": "Caldergrove Gardens, EH11",
"price": "\u00a3292,000",
"propertysummary": "3 bedrooms. New development.",
"propertydescription": "Caldergrove Gardens is an innovative and stylish development of 55, 3, 4 & 5 bedroom detached homes, offering seven contemporary house styles. Show home open Thursday - Monday."
}Promotion for use in retail by consumer.
urllogoURL of the logo to be displayed on the card. Image should be under 2MB.
promotitleTitle of the promotion.
subtitleSubtitle of the promotion.
urlimageURL of the image to be displayed on the card. Image should be under 2MB.
detailsA brief description of the promotion.
actiontextText on button that user clicks to order, book or find out more.
urlactionURL of web page where user can order, book or find out more.
additionaltextAny additional details regarding the promotion.
{
"urllogo": "https://richmsg.io/media/images/pizza-logo.png",
"promotitle": "Pizza Tuesday",
"subtitle": "Buy one and get one free!",
"urlimage": "https://richmsg.io/media/images/pizza.jpeg",
"details": "When you order one large pizza on Tuesdays, we will give you another large pizza of your choice for free. Terms and conditions apply.",
"actiontext": "Order Now",
"urlaction": "https://abc.com",
"additionaltext": "Terms and Conditions Apply"
}Ticket card for an event.
eventName of the event for the ticket.
subtitleSubtitle of the event for the ticket.
urlimageURL of the image to be displayed on the ticket.
datetimeDate and time of the event.
venueWhere the event is taking place.
seatSeat allocated to this ticket.
instructionsInstructions associated with ticket and event.
{
"event": "Strictly Dancing",
"subtitle": "Christmas Tour",
"urlimage": "https://melroselabs.com/phpqrcode/qrimg.php?qr=abc",
"datetime": "23 Jan 2020, 7pm",
"venue": "Dome, Glasgow, G1 1AB",
"instructions": "Arrive 30 minutes prior to the performance for security checks.",
"seat": "Q32",
"urlaction": "https://abc.com"
}Coupon card for use in retail with consumers.
logoURL of the logo image to be displayed on the coupon.
coupontitleTitle to show on the coupon.
subtitleSubtitle of the coupon.
couponnumberText showing coupon number. Can contain letters and numbers.
validuntildatetimeDate and time the the coupon is valid until.
validlocationsLocations at which the coupon is valid.
detailsDetails on the use of this coupon for the holder of the coupon.
{
"logo": "https://richmsg.io/media/images/sf-logo.png",
"coupontitle": "Sainsfield Coupon",
"subtitle": "Use this coupon to receive 5% discount on your next shop!",
"couponnumber": "9823782738213",
"validuntildatetime": "23 Jan 2020, 7pm",
"validlocations": "All UK stores",
"details": "Show this coupon when you go to the checkout to receive your discount."
}Card template to encourage customers to make reservations.
topImageURL of the image to be displayed.
restaurantNameName of restaurant.
ratingValueAverage rating from reviewers
reviewCountNumber of reviews
messageMessage to show encouraging patron to book.
timeWhenAvailabilityTitle showing when times are available (e.g. "Tonight's availability")
timeSlotATime for slot (e.g. "5:00")
timeSlotBTime for slot (e.g. "5:00")
timeSlotCTime for slot (e.g. "5:00")
timeSlotDTime for slot (e.g. "5:00")
timeSlotETime for slot (e.g. "5:00")
timeSlotFTime for slot (e.g. "5:00")
urlActionAWebsite link (URL) that user is taken to when they click on the button for this time slot.
urlActionBWebsite link (URL) that user is taken to when they click on the button for this time slot.
urlActionCWebsite link (URL) that user is taken to when they click on the button for this time slot.
urlActionDWebsite link (URL) that user is taken to when they click on the button for this time slot.
urlActionEWebsite link (URL) that user is taken to when they click on the button for this time slot.
urlActionFWebsite link (URL) that user is taken to when they click on the button for this time slot.
{
"restaurantName": "Benedicts restaurant",
"topImage": "https://richmsg.io/media/images/restaurant-burger-meal.jpg",
"ratingValue": 4.5,
"reviewCount": 319,
"message": "We're open tonight and all burger meals have 10% discount. Book a table before they go!",
"timeWhenAvailability": "Tonight's availability",
"timeSlotA": "5:30",
"urlActionA": "https://abc.com/A",
"timeSlotB": "7:30",
"urlActionB": "https://abc.com/B",
"timeSlotC": "8:00",
"urlActionC": "https://abc.com/C",
"timeSlotD": "8.30",
"urlActionD": "https://abc.com/D",
"timeSlotE": "9:00",
"urlActionE": "https://abc.com/E",
"timeSlotF": "other",
"urlActionF": "https://abc.com/F"
}Create a message for delivery and get transaction ID for submission.
JSON request: