{
	"info": {
		"_postman_id": "d8bbf791-c34d-473b-ac7d-c989c78e0b47",
		"name": "API Example Clients",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "Testing Endpoint - Send Example",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"API_KEY = 'YOUR_API_KEY';",
							"SECRET_KEY = 'YOUR_API_SECRET';",
							"",
							"function getAuthHeaderxkey(requestBody) {",
							"",
							"    var hmacDigest = CryptoJS.HmacSHA512(requestBody, SECRET_KEY).toString(CryptoJS.digest);",
							"    console.log(requestBody)",
							"    console.log(hmacDigest)",
							"    ",
							"    return hmacDigest;",
							"",
							"}",
							"",
							"var Header = require('postman-collection').Header",
							"pm.request.headers.add(new Header(\"x-api-key: \" + API_KEY))",
							"pm.request.headers.add(new Header(\"x-api-sign: \" + getAuthHeaderxkey(request['data'])))"
						],
						"type": "text/javascript"
					}
				}
			],
			"request": {
				"method": "POST",
				"header": [],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"msisdn\": \"359XXXXXXXXX\",\n    \"sc\": \"1990\",\n    \"text\": \"test\",\n    \"service_id\": \"YOUR_SERVICE_ID\"\n}",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "https://api-test.msghub.cloud/send",
					"protocol": "https",
					"host": [
						"api-test",
						"msghub",
						"cloud"
					],
					"path": [
						"send"
					]
				}
			},
			"response": []
		},
		{
			"name": "Testing Endpoint - Delivery report Example",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"API_KEY = 'YOUR_API_KEY';",
							"SECRET_KEY = 'YOUR_API_SECRET';",
							"",
							"function getAuthHeaderxkey(requestBody) {",
							"",
							"    var hmacDigest = CryptoJS.HmacSHA512(requestBody, SECRET_KEY).toString(CryptoJS.digest);",
							"    console.log(requestBody)",
							"    console.log(hmacDigest)",
							"    ",
							"    return hmacDigest;",
							"",
							"}",
							"",
							"var Header = require('postman-collection').Header",
							"pm.request.headers.add(new Header(\"x-api-key: \" + API_KEY))",
							"pm.request.headers.add(new Header(\"x-api-sign: \" + getAuthHeaderxkey(request['data'])))"
						],
						"type": "text/javascript"
					}
				}
			],
			"request": {
				"method": "POST",
				"header": [],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"sms_id\": \"test1-605afe0b56c7c9.82189217\",\n    \"service_id\": \"YOUR_SERVICE_ID\"\n}",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "https://api-test.msghub.cloud/dlr",
					"protocol": "https",
					"host": [
						"api-test",
						"msghub",
						"cloud"
					],
					"path": [
						"dlr"
					]
				}
			},
			"response": []
		},
		{
			"name": "Production Endpoint - Send Example",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"API_KEY = 'YOUR_API_KEY';",
							"SECRET_KEY = 'YOUR_API_SECRET';",
							"",
							"function getAuthHeaderxkey(requestBody) {",
							"",
							"    var hmacDigest = CryptoJS.HmacSHA512(requestBody, SECRET_KEY).toString(CryptoJS.digest);",
							"    console.log(requestBody)",
							"    console.log(hmacDigest)",
							"    ",
							"    return hmacDigest;",
							"",
							"}",
							"",
							"var Header = require('postman-collection').Header",
							"pm.request.headers.add(new Header(\"x-api-key: \" + API_KEY))",
							"pm.request.headers.add(new Header(\"x-api-sign: \" + getAuthHeaderxkey(request['data'])))"
						],
						"type": "text/javascript"
					}
				}
			],
			"request": {
				"method": "POST",
				"header": [],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"msisdn\": \"359XXXXXXXXX\",\n    \"sc\": \"1990\",\n    \"text\": \"test\",\n    \"service_id\": \"YOUR_SERVICE_ID\"\n}",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "https://api.msghub.cloud/send",
					"protocol": "https",
					"host": [
						"api",
						"msghub",
						"cloud"
					],
					"path": [
						"send"
					]
				}
			},
			"response": []
		},
		{
			"name": "Production Endpoint - Delivery Report Example",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"API_KEY = 'YOUR_API_KEY';",
							"SECRET_KEY = 'YOUR_API_SECRET';",
							"",
							"function getAuthHeaderxkey(requestBody) {",
							"",
							"    var hmacDigest = CryptoJS.HmacSHA512(requestBody, SECRET_KEY).toString(CryptoJS.digest);",
							"    console.log(requestBody)",
							"    console.log(hmacDigest)",
							"    ",
							"    return hmacDigest;",
							"",
							"}",
							"",
							"var Header = require('postman-collection').Header",
							"pm.request.headers.add(new Header(\"x-api-key: \" + API_KEY))",
							"pm.request.headers.add(new Header(\"x-api-sign: \" + getAuthHeaderxkey(request['data'])))"
						],
						"type": "text/javascript"
					}
				}
			],
			"request": {
				"method": "POST",
				"header": [],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"sms_id\": \"ID_RECIEVED_WHEN_SENDING\",\n    \"service_id\": \"YOUR_SERVICE_ID\"\n}",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "https://api.msghub.cloud/dlr",
					"protocol": "https",
					"host": [
						"api",
						"msghub",
						"cloud"
					],
					"path": [
						"dlr"
					]
				}
			},
			"response": []
		}
	]
}
