{
    "info": {
        "_postman_id": "altify-sms-api-collection",
        "name": "Altify SMS Hub API",
        "description": "Import this collection into Postman.\n\n1. Set collection variable `apiKey` to your Access Key.\n2. Prefer Bearer auth (already configured).\n3. Base URL variable `baseUrl` defaults to https://www.smshub.altifysolutions.com/api.",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "variable": [
        {
            "key": "baseUrl",
            "value": "https://www.smshub.altifysolutions.com/api"
        },
        {
            "key": "apiKey",
            "value": "YOUR_ACCESS_KEY"
        },
        {
            "key": "partnerID",
            "value": ""
        },
        {
            "key": "shortcode",
            "value": "LEE TECH"
        },
        {
            "key": "mobile",
            "value": "2547XXXXXXXX"
        }
    ],
    "auth": {
        "type": "bearer",
        "bearer": [
            {
                "key": "token",
                "value": "{{apiKey}}",
                "type": "string"
            }
        ]
    },
    "item": [
        {
            "name": "Services",
            "item": [
                {
                    "name": "Send SMS",
                    "request": {
                        "method": "POST",
                        "header": [],
                        "url": "{{baseUrl}}/services/sendsms",
                        "body": {
                            "mode": "urlencoded",
                            "urlencoded": [
                                {
                                    "key": "apikey",
                                    "value": "{{apiKey}}",
                                    "type": "text"
                                },
                                {
                                    "key": "partnerID",
                                    "value": "{{partnerID}}",
                                    "type": "text"
                                },
                                {
                                    "key": "message",
                                    "value": "Hello from {{shortcode}}",
                                    "type": "text"
                                },
                                {
                                    "key": "shortcode",
                                    "value": "{{shortcode}}",
                                    "type": "text"
                                },
                                {
                                    "key": "mobile",
                                    "value": "{{mobile}}",
                                    "type": "text"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "Send Bulk SMS",
                    "request": {
                        "method": "POST",
                        "header": [],
                        "url": "{{baseUrl}}/services/sendbulk",
                        "body": {
                            "mode": "urlencoded",
                            "urlencoded": [
                                {
                                    "key": "apikey",
                                    "value": "{{apiKey}}",
                                    "type": "text"
                                },
                                {
                                    "key": "message",
                                    "value": "Bulk hello",
                                    "type": "text"
                                },
                                {
                                    "key": "shortcode",
                                    "value": "{{shortcode}}",
                                    "type": "text"
                                },
                                {
                                    "key": "mobile",
                                    "value": "{{mobile}}",
                                    "type": "text"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "Balance (services)",
                    "request": {
                        "method": "POST",
                        "header": [],
                        "url": "{{baseUrl}}/services/balance",
                        "body": {
                            "mode": "urlencoded",
                            "urlencoded": [
                                {
                                    "key": "apikey",
                                    "value": "{{apiKey}}",
                                    "type": "text"
                                },
                                {
                                    "key": "partnerID",
                                    "value": "{{partnerID}}",
                                    "type": "text"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "List Sender IDs (services)",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/services/senderids?apikey=%7B%7BapiKey%7D%7D",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "query": [
                                {
                                    "key": "apikey",
                                    "value": "{{apiKey}}"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "Calculate parts",
                    "request": {
                        "method": "POST",
                        "header": [],
                        "url": "{{baseUrl}}/services/calculate",
                        "auth": {
                            "type": "noauth"
                        },
                        "body": {
                            "mode": "urlencoded",
                            "urlencoded": [
                                {
                                    "key": "message",
                                    "value": "Hello world",
                                    "type": "text"
                                }
                            ]
                        }
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Account",
            "item": [
                {
                    "name": "Check balance",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": "{{baseUrl}}/check/balance"
                    },
                    "response": []
                },
                {
                    "name": "List Sender IDs",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": "{{baseUrl}}/sender-id"
                    },
                    "response": []
                },
                {
                    "name": "List contacts",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/contacts?page=1",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "query": [
                                {
                                    "key": "page",
                                    "value": "1"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "Contact details",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/contact/details?number=%7B%7Bmobile%7D%7D",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "query": [
                                {
                                    "key": "number",
                                    "value": "{{mobile}}"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "Customer numbers",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/customer/number?type=number",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "query": [
                                {
                                    "key": "type",
                                    "value": "number"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "SMS templates",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": "{{baseUrl}}/sms/template"
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Messaging",
            "item": [
                {
                    "name": "Send OTP",
                    "request": {
                        "method": "POST",
                        "header": [],
                        "url": "{{baseUrl}}/otp/message",
                        "body": {
                            "mode": "urlencoded",
                            "urlencoded": [
                                {
                                    "key": "number",
                                    "value": "{{mobile}}",
                                    "type": "text"
                                },
                                {
                                    "key": "code",
                                    "value": "482913",
                                    "type": "text"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "Compose send",
                    "request": {
                        "method": "POST",
                        "header": [],
                        "url": "{{baseUrl}}/sent/compose",
                        "body": {
                            "mode": "urlencoded",
                            "urlencoded": [
                                {
                                    "key": "from_type",
                                    "value": "sender_id",
                                    "type": "text"
                                },
                                {
                                    "key": "sender_id",
                                    "value": "{{shortcode}}",
                                    "type": "text"
                                },
                                {
                                    "key": "to_numbers",
                                    "value": "{{mobile}}",
                                    "type": "text"
                                },
                                {
                                    "key": "body",
                                    "value": "Compose API hello",
                                    "type": "text"
                                }
                            ]
                        }
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Campaigns",
            "item": [
                {
                    "name": "List campaigns",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": "{{baseUrl}}/campaign/list"
                    },
                    "response": []
                },
                {
                    "name": "Campaign statistic",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": "{{baseUrl}}/campaign/statistic/1"
                    },
                    "response": []
                }
            ]
        }
    ]
}