Create destination

This API creates a message service destination. The following types are supported:

TypeProviderRequired Fields
emailsmtptype, body or message_template_id, deliver_to
smstwilio, yunpiantype, body, country_code, deliver_to
pushfcm, apnstype, app_id, body, deliver_to, meta_data
{
	"destination": {
		"type": "email",
		"body": "Your downstairs leak detector at 1234 Ayla Avenue has a low battery",
		"message_template_id": "TestTemplateId",
		"deliver_to": nulla,
		"contact_id" : 123,
		"title": "Hello Ayla User",
		"provider": "smtp",
		"user_message": "Hello Ayla User",
		"user_name": "Methew Hedan",
    "repeat_freq": 30
	}
}
{
  "destination": {
    "type": "sms",
    "body": "Leak detector battery is low.",
    "country_code": "+91",
    "deliver_to": "9100008888",
    "provider": "twilio",
    "repeat_freq": 30
  }
}
{
	"destination": {
		"app_id": "app_XXXXXX_0-sA-id",
		"body": "Your downstairs leak detector at 1234 Ayla Avenue has a low battery",
		"deliver_to": "18610E3F420EXXXXXXXXXXXXXXXXXXBAC80FC9A529FF48C2ADE28EC892",
		"meta_data": "{\"metadata\":\"push metadata\",\"attributes.fcm\":{\"priority\":\"normal\",\"ttl\":20}},
		"provider": "fcm",
		"sound": "chime",
		"title": "Auro-App Notification",
		"type": "push"
	}
}
{
    "destination": {
        "type": "push",
        "app_id": "app_XXXXX_01-sA-id",
        "body": "Your downstairs leak detector at 1234 Ayla Avenue has a low battery",
        "deliver_to": "18610E3F42XXXXXXXXXXXXXXXXXXXXXXXXXC80FC9A529FF48C2ADE28EC892",
        "meta_data": "{\"metadata\":\"push metadata\",\"attributes.apns\":{\"priority\":10,\"ttl\":501}}",
        "provider": "apns",
        "repeat_freq": 30,
        "sound": "chime",
        "title": "Auro-App Notification"
    }
}
Language
Authorization
Header
Click Try It! to start a request and see the response here!