{
  "info": {
    "_postman_id": "a984f18b-1520-410a-b283-92f7035d8e01",
    "name": "NizoraSMS — Pure OTP API India",
    "description": "Official Postman Collection for NizoraSMS OTP Platform. Deliver authentication and verification OTPs across Indian telecom operators (Jio, Airtel, Vi, BSNL) in under 2.5 seconds with 99.9% uptime and DLT compliance.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "1. Send Instant OTP",
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              "var jsonData = pm.response.json();",
              "pm.test(\"Status is 200 or 202\", function () {",
              "    pm.expect(pm.response.code).to.be.oneOf([200, 202]);",
              "});",
              "if (jsonData.data && jsonData.data.request_id) {",
              "    pm.collectionVariables.set(\"last_request_id\", jsonData.data.request_id);",
              "    console.log(\"Saved last_request_id:\", jsonData.data.request_id);",
              "}"
            ],
            "type": "text/javascript"
          }
        }
      ],
      "request": {
        "auth": {
          "type": "bearer",
          "bearer": [
            {
              "key": "token",
              "value": "{{apiKey}}",
              "type": "string"
            }
          ]
        },
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Idempotency-Key",
            "value": "{{$guid}}",
            "description": "Optional UUID to prevent duplicate OTP dispatches during network retries."
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"mobile\": \"9876543210\",\n  \"otp\": \"492815\",\n  \"template_id\": \"1\",\n  \"reference_id\": \"REF-USR-9920\"\n}"
        },
        "url": {
          "raw": "{{baseUrl}}/api/v1/otp/send",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "otp",
            "send"
          ]
        },
        "description": "Dispatches an instant OTP to an Indian mobile number. Bypasses regular marketing queues and routes via priority transactional telecom pipes (Jio, Airtel, Vi, BSNL)."
      },
      "response": [
        {
          "name": "Success 202 Accepted",
          "originalRequest": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"mobile\": \"9876543210\",\n  \"otp\": \"492815\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/api/v1/otp/send",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "otp",
                "send"
              ]
            }
          },
          "status": "Accepted",
          "code": 202,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "cookie": [],
          "body": "{\n  \"status\": \"success\",\n  \"data\": {\n    \"request_id\": \"req_7f8a91c2b4d5\",\n    \"mobile\": \"9876543210\",\n    \"status\": \"queued\",\n    \"units\": 1,\n    \"dispatched_at\": \"2026-10-13T10:14:02Z\"\n  }\n}"
        }
      ]
    },
    {
      "name": "2. Get OTP Delivery Status",
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              "pm.test(\"Status code is 200\", function () {",
              "    pm.response.to.have.status(200);",
              "});"
            ],
            "type": "text/javascript"
          }
        }
      ],
      "request": {
        "auth": {
          "type": "bearer",
          "bearer": [
            {
              "key": "token",
              "value": "{{apiKey}}",
              "type": "string"
            }
          ]
        },
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{baseUrl}}/api/v1/otp/status?request_id={{last_request_id}}",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "otp",
            "status"
          ],
          "query": [
            {
              "key": "request_id",
              "value": "{{last_request_id}}",
              "description": "Unique Request ID returned by /api/v1/otp/send"
            }
          ]
        },
        "description": "Fetches real-time telecom delivery status (DLR) for an OTP request, including carrier timestamps and delivery receipts."
      },
      "response": [
        {
          "name": "Delivered 200 OK",
          "originalRequest": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/v1/otp/status?request_id=req_7f8a91c2b4d5"
            }
          },
          "status": "OK",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "cookie": [],
          "body": "{\n  \"status\": \"success\",\n  \"data\": {\n    \"request_id\": \"req_7f8a91c2b4d5\",\n    \"mobile\": \"9876543210\",\n    \"delivery_status\": \"DELIVERED\",\n    \"delivered_at\": \"2026-10-13T10:14:04Z\",\n    \"latency_seconds\": 2.1\n  }\n}"
        }
      ]
    }
  ],
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://nizorasms.com",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "YOUR_NIZORA_API_KEY",
      "type": "string"
    },
    {
      "key": "last_request_id",
      "value": "req_sample_id",
      "type": "string"
    }
  ]
}
