{"info":{"_postman_id":"5c68af75-04ee-4011-b902-f3d3e0299392","name":"Kaleyra Hexa","description":"Kaleyra Hexa, the flagship product, allows developers, businesses and startups to code, build and scale their communication. At Hexa, we offer it all; right from SMS, Voice, Numbers, Instant Messaging and Emails.\n\n# Hexa API\nIntroducing the powerful API that can seamlessly perform multiple functions in less than 5 milliseconds. We made it simple for you, with minimum coding and a multidimensional approach. \n\nYou can download the [Postman collection for Hexa here](https://www.getpostman.com/collections/0f8cc583dd99b57e8f53)\n\n# Login And Get API Key to get started\n\nTo get an API Key, you will have to create one by [logging in to our application](https://hexa.kaleyra.io/). The process is listed below: \n\n# Create an API Key\n\nTo create an API key, follow the steps below:\n\n1. From the Hexa application, click on 'Dev Console'\n2. Click on 'Create an API Key'\n3. Enter the details and click 'Add' \n\n# API Parameters\nThe following are the API Parameters for Hexa APIs:\n\n|Parameter Name |Description |\n|---------- |-------------- |\n|type |Type of SMS, i.e, marketing (MKT), transactional (TXN), One Time Passwords (OTP) |\n|body |Message(s) to be sent |\n|to |To phone number(s) |\n|sender |Sender id|\n|ref |Message reference tags |\n|listid |Contact number groups |\n|time |Time in the format dd-mm-yyyy hh:mm:ss |\n|dlrurl |Delivery url |\n\n# Parameter Combinations\n> 'to' and 'listid' cannot be used in the same trigger. 'to' parameter will be priortized instead of 'listid', for both sending and scheduling the SMS.\n\n> For OTP messages, only one mobile number can be added per request\n\n# Mandatory Parameters\n|Parameter Name |Description |\n|---------- |-------------- |\n|to |Mobile number(s) to which the SMS has to be sent |\n|body|Message content |\n|sender |Sender id |\n|type |Type of the message (TXT, MKT, OTP)\n\n\n\n\n# Error Codes\n|Error Code |Description |\n|--------- |---------- |\n|E100 |Message Submitted Successfully |\n|E101 |Campaign Accepted |\n|E102 |No Medium Configured for Queue |\n|E103 |Internal Server Error |\n|E104 |No Records Found |\n|E105 |Status Field is Mandatory |\n|E400 |For bulk SMS type should be MKT |\n|E401 |SMS length is exceeding '.Config('sms.max_length').' characters. |\n|E402 |Message can be scheduled for after 15 minutes from current time and before 3 months from now |\n|E403 |Something went wrong at our end please try again after some time |\n|E404 |If Type is OTP then only one mobile number is allowed |\n|E405 |If Type is TXN then mobile numbers should not be more than 100 |\n|E406 |No Valid mobile numbers found |\n|E407 |Sms nodes are mandatory in JSON API |\n|E408 |to field is mandatory in each sms nodes |\n|E409 |Maximum '.config('sms.json.max_limit').' sms nodes are allowed |\n|E410 |To field cannot contain commas |\n|E411 |To field has to be filled in sms nodes |\n|E412 |Body has to be filled, Either in sms nodes or in global node |\n|E413 |Invalid inputs, Validation error |\n|E600 |To field has to be filled |\n|E601 |Body cannot be left empty |\n|E602 |Sender-Id is required |\n|E603 |Port number must contain only numbers |\n|E604 |Unicode should contain only 0, 1 or AUTO |\n|E605 |Duplicate should contain only 1 or 0 |\n|E606 |Flash should contain only 1 or 0 |\n|E607 |Campaign name should contain only alpha numerics |\n|E608 |ref should contain only alpha numerics |\n|E609 |ref1 should contain only alpha numerics |\n|E610 |ref2 should contain only alpha numerics |\n|E611 |Type is required |\n|E612 |For Group SMS Use Either 'to' field or 'list_id' field |\n|E613 |List_id field has to be filled |\n|E614 |For 'list_id' type should not be OTP |\n|E615 |Type has to be either TXN, MKT or OTP |\n|E616 |Sender field has to be filled |\n|E617 |Campaign_id field has to be filled |\n|E618 |Body field has to be filled |\n|E619 |Invalid Sender ID Pattern |\n|E620 |Campaign validated successfully |\n|E621 |Invalid Sender ID Pattern |\n|E622 |Invalid Sender ID Pattern |\n|E623 |Transactional Route is not enabled for your account. |\n|E624 |Default Route is not enabled for your account |\n|E625 |Marketing Route is not enabled for your account |\n|E626 |Request Completed Successfully |\n|E638 |Upload the files |\n|E639 |Upload only csv or pdf files |\n|E640 |Upload files which are less than 1 MB |\n|E641 |Source will contain minimum 3 characters and maximum 10 characters |\n|E642 |Source has to be filled with only string |\n|E700 |Unable to upload the file |","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json"},"item":[{"name":"Send SMS ","id":"3257009b-1733-4f5e-8a4b-ead65ef7e304","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"},{"key":"api-key","value":"{{api-key}}"}],"body":{"mode":"urlencoded","urlencoded":[{"description":"Mandatory: The number(s) to which SMS has to be sent separated by a comma","key":"to","type":"text","value":"+91917XXXXXX834, +39XXXXXXXXXX, +15XXXXX30XX"},{"description":"Mandatory: Sender ID to trigger the SMS","key":"sender","type":"text","value":"KALERA"},{"description":"Mandatory: Type of SMS, transactional or promotional","key":"type","type":"text","value":"TXN"},{"description":"Mandatory: The message content","key":"body","type":"text","value":"Welcome to Kaleyra"},{"description":"Optional: The delivery URL. It should always be URL encoded","key":"dlrurl","type":"text","value":"https%3A%2F%2Fbitbucket.org%2Fubi-si-dev%2XXXXXXXXXXsrc%2Fmaster%2F","disabled":true},{"description":"Optional: The date & time for scheduling an SMS","key":"time","type":"text","value":"dd/mm/yyyy hh:mm:ss","disabled":true},{"description":"Optional: If value = 1 then the message is unicode, value = 0, message is normal, value = AUTO, the system takes a call based on the message content","key":"unicode","type":"text","value":"1","disabled":true},{"description":"Optional: Group/ list name","key":"list_id","type":"text","value":"group name","disabled":true}]},"url":"{{ap_url}}/{{version}}/{{sid}}/messages/","description":"Send SMS seamlessly, schedule it, add contacts or just numbers, send SMS to groups and do much more with a single API.\n\n> DLR URL: It should always be URL encoded\n\n> Time: The time zone should always be according to UTC time standards. The scheduled messages will be sent according to UTC timezone only\n"},"response":[{"id":"3f2c244f-ef27-458d-b8d1-1a93172677be","name":"JSON","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"},{"key":"api-key","value":"{{api-key}}"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"to","value":"+91917XXXXXX834, +39XXXXXXXXXX, +15XXXXX30XX","description":"Mandatory: The number(s) to which SMS has to be sent separated by a comma","type":"text"},{"key":"sender","value":"KALERA","description":"Mandatory: Sender ID to trigger the SMS","type":"text"},{"key":"type","value":"TXN","description":"Mandatory: Type of SMS, transactional or promotional","type":"text"},{"key":"body","value":"Welcome to Kaleyra","description":"Mandatory: The message content","type":"text"},{"key":"dlrurl","value":"https%3A%2F%2Fbitbucket.org%2Fubi-si-dev%2XXXXXXXXXXsrc%2Fmaster%2F","description":"Optional: The delivery URL. It should always be URL encoded","type":"text","disabled":true},{"key":"time","value":"dd/mm/yyyy hh:mm:ss","description":"Optional: The date & time for scheduling an SMS","type":"text","disabled":true},{"key":"unicode","value":"1","description":"Optional: If value = 1 then the message is unicode, value = 0, message is normal, value = AUTO, the system takes a call based on the message content","type":"text","disabled":true},{"key":"list_id","value":"group name","description":"Optional: Group/ list name","type":"text","disabled":true}]},"url":"{{ap_url}}/{{version}}/{{sid}}/messages/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"code\": \"E100\",\n    \"message\": \"Message Submitted Successfully!\",\n    \"data\": [\n        {\n            \"message_id\": \"024fb52a-ac7c-43f0-adee-a20253a91101:1\",\n            \"mobile\": \"9986136317\"\n        }\n    ],\n    \"error\": {}\n}"},{"id":"45252b56-2ca1-4cd2-910b-fff23128b0cf","name":"XML","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"},{"key":"api-key","value":"{{api-key}}"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"to","value":"+91917XXXXXX834, +39XXXXXXXXXX, +15XXXXX30XX","description":"Mandatory: The number(s) to which SMS has to be sent separated by a comma","type":"text"},{"key":"sender","value":"KALERA","description":"Mandatory: Sender ID to trigger the SMS","type":"text"},{"key":"type","value":"TXN","description":"Mandatory: Type of SMS, transactional or promotional","type":"text"},{"key":"body","value":"Welcome to Kaleyra","description":"Mandatory: The message content","type":"text"},{"key":"dlrurl","value":"https%3A%2F%2Fbitbucket.org%2Fubi-si-dev%2XXXXXXXXXXsrc%2Fmaster%2F","description":"Optional: The delivery URL. It should always be URL encoded","type":"text","disabled":true},{"key":"time","value":"dd/mm/yyyy hh:mm:ss","description":"Optional: The date & time for scheduling an SMS","type":"text","disabled":true},{"key":"unicode","value":"1","description":"Optional: If value = 1 then the message is unicode, value = 0, message is normal, value = AUTO, the system takes a call based on the message content","type":"text","disabled":true},{"key":"list_id","value":"group name","description":"Optional: Group/ list name","type":"text","disabled":true}]},"url":"{{ap_url}}/{{version}}/{{sid}}/messages/"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\"code\":\"E100\",\"message\":\"Message Submitted Successfully!\",\"data\":[{\"message_id\":\"024fb52a-ac7c-43f0-adee-a20253a91101:1\",\"mobile\":\"9986136317\"}],\"error\":{}}"}],"_postman_id":"3257009b-1733-4f5e-8a4b-ead65ef7e304"},{"name":"SMS Status","id":"2bf7e78a-ab94-4108-bf84-cd1f0603c18c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"api-key","value":"{{api-key}}"},{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"message_ids\" : [\"ab5XXXXX-50c3-4aXX-b3e1-XXXXXXXX287d:1\",\"8XXXXXXf-f570-4XX2-94d6-eceXXXXXX2a:2\"]\n}"},"url":"{{ap_url}}/{{version}}/{{sid}}/messages/status","description":"Get the status of the SMS, in both the GET and POST methods. Enter the message id to trigger the API.\n"},"response":[{"id":"c74c9594-2704-4347-bd23-547c134b4c98","name":"POST","originalRequest":{"method":"POST","header":[{"key":"api-key","value":"{{api-key}}"},{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"message_ids\" : [\"ab5a675a-50c3-4ae8-b3e1-47f5e2e8287d:1\",\"8420c00f-f570-4632-94d6-ece4b89d8b2a:2\"]\n}"},"url":"{{url}}/v1/{{sid}}/messages/status"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 03 Apr 2019 07:26:45 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"nginx"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Headers","value":"content-type,Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET,POST,OPTIONS,DELETE,PUT"},{"key":"Cache-Control","value":"no-cache, private"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": \"S402\",\n    \"message\": \"Request Completed Successfully!\",\n    \"data\": [\n        {\n            \"status\": \"Delivered\",\n            \"status_trace\": \"DELIVRD\",\n            \"message_id\": \"ab5a675a-50c3-4ae8-b3e1-47f5e2e8287d:1\"\n        },\n        {\n            \"status\": \"SENT\",\n            \"message_id\": \"8420c00f-f570-4632-94d6-ece4b89d8b2a:2\"\n        }\n    ],\n    \"error\": {}\n}"},{"id":"dc29d26c-a810-423d-9ea5-4d7ee166c7ce","name":"GET","originalRequest":{"method":"GET","header":[{"key":"api-key","value":"{{api-key}}"},{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"message_ids\" : [\"ab5a675a-50c3-4ae8-b3e1-47f5e2e8287d:1\",\"8420c00f-f570-4632-94d6-ece4b89d8b2a:2\"]\n}"},"url":{"raw":"{{url}}/{{version}}/{{sid}}/messages/status?message_ids={{value}}","host":["{{url}}"],"path":["{{version}}","{{sid}}","messages","status"],"query":[{"key":"message_ids","value":"{{value}}"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 03 Apr 2019 07:26:45 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"nginx"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Headers","value":"content-type,Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET,POST,OPTIONS,DELETE,PUT"},{"key":"Cache-Control","value":"no-cache, private"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": \"S402\",\n    \"message\": \"Request Completed Successfully!\",\n    \"data\": [\n        {\n            \"status\": \"Delivered\",\n            \"status_trace\": \"DELIVRD\",\n            \"message_id\": \"ab5a675a-50c3-4ae8-b3e1-47f5e2e8287d:1\"\n        },\n        {\n            \"status\": \"SENT\",\n            \"message_id\": \"8420c00f-f570-4632-94d6-ece4b89d8b2a:2\"\n        }\n    ],\n    \"error\": {}\n}"}],"_postman_id":"2bf7e78a-ab94-4108-bf84-cd1f0603c18c"}],"event":[{"listen":"prerequest","script":{"id":"a98fe7bc-8171-4f6e-b39a-d04b13229e44","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"14b0648e-a593-4754-a9d1-2991adc3529f","type":"text/javascript","exec":[""]}}]}