{
  "openapi": "3.0.0",
  "info": {
    "title": "SMSGO SMS Gateway API",
    "description": "Send SMS messages through the SMSGO platform via HTTP POST.\n\n---\n\n**Key Features:**\n\n- **Multiple Encodings:** `BIG5` (Traditional Chinese), `ASCII`, `UCS2` (Unicode).\n- **Long SMS:** Up to 335 characters.\n- **WAP Push:** Send links to mobile devices.\n- **Scheduled Delivery:** Schedule future sends.\n- **Callbacks:** Webhooks for delivery status and user replies.\n\n---\n\n**Notes:**\n\n1. `BIG5`/`ASCII`/`UCS2` support single SMS only. Messages exceeding the limit are auto-truncated.\n2. `PBIG5`/`PASCII` are POPUP. `LBIG5`/`LASCII`/`LUCS2` are long SMS (max 335 Chinese chars).\n3. For `PUSH`, `smbody`+`wapurl` combined must be ≤ 88 bytes (Chinese chars count as 3 bytes).\n4. Setting `replyurl` enables SMS reply at +1 point per 10 messages (max URL length: 300 chars).\n5. International SMS: only `BIG5`/`ASCII`/`UCS2`. Use `UCS2` for Simplified Chinese.\n> ⚠️ **Important:** To use this API, you will need to contact customer support to enable it.\n\n---\n\n**Contact:**\n\n- 💬 LINE: [@cdn4573o](https://line.me/R/ti/p/@cdn4573o)",
    "version": "1.8.0",
    "contact": {
      "name": "SMSGO Support",
      "url": "https://www.smsgo.com.tw/online/online.asp?click=4"
    }
  },
  "servers": [
    {
      "url": "https://www.smsgo.com.tw",
      "description": "Production Server"
    }
  ],
  "tags": [
    {
      "name": "SMS",
      "description": "Operations for sending and managing SMS messages."
    },
    {
      "name": "Query",
      "description": "Operations for querying message delivery status."
    },
    {
      "name": "Account",
      "description": "Operations for managing account settings and points."
    },
    {
      "name": "Verification",
      "description": "Operations for sending and verifying one-time passwords (OTP)."
    }
  ],
  "components": {
    "parameters": {
      "Username": {
        "name": "username",
        "in": "query",
        "required": true,
        "description": "Member account username",
        "schema": {
          "type": "string",
          "example": "your_username"
        }
      },
      "Password": {
        "name": "password",
        "in": "query",
        "required": true,
        "description": "Member password or API Key",
        "schema": {
          "type": "string",
          "format": "password",
          "example": "your_password"
        }
      },
      "DstAddr": {
        "name": "dstaddr",
        "in": "query",
        "required": true,
        "description": "Recipient mobile number(s). Multiple numbers comma-separated (max 50). Domestic: 09xxxxxxxx. International: prefix with `+` URL-encoded as `%2b`, e.g. `%2b8613681912700`.",
        "schema": {
          "type": "string",
          "example": "0912345678"
        }
      },
      "DstAddrBulk": {
        "name": "dstaddr",
        "in": "query",
        "required": true,
        "description": "One or more phone numbers separated by commas. Count must match `msgid`.",
        "schema": {
          "type": "string",
          "example": "0912345678,0987654321"
        }
      },
      "SmBody": {
        "name": "smbody",
        "in": "query",
        "required": true,
        "description": "SMS content. Max 70 chars (zh/en mix) or 160 chars (ASCII). Long SMS (`L*` encodings): max 335 chars. WAP Push (`PUSH`): this is the push title; `smbody`+`wapurl` ≤ 88 bytes.",
        "schema": {
          "type": "string",
          "example": "Hello from SMSGO"
        }
      },
      "Encoding": {
        "name": "encoding",
        "in": "query",
        "required": false,
        "description": "Message encoding. Default: `BIG5`.\n\n| Value | Description |\n|---|---|\n| `BIG5` | Traditional Chinese, single SMS, max 70 chars |\n| `ASCII` | English only, single SMS, max 160 chars |\n| `UCS2` | Unicode (Japanese, Korean, Simplified Chinese) |\n| `PBIG5` | POPUP Traditional Chinese |\n| `PASCII` | POPUP English |\n| `LBIG5` | Long SMS Traditional Chinese, max 335 chars |\n| `LASCII` | Long SMS English |\n| `LUCS2` | Long SMS Unicode |\n| `PUSH` | WAP Push (requires `wapurl`) |",
        "schema": {
          "type": "string",
          "default": "BIG5",
          "enum": [
            "BIG5",
            "ASCII",
            "UCS2",
            "PBIG5",
            "PASCII",
            "LBIG5",
            "LASCII",
            "LUCS2",
            "PUSH"
          ]
        }
      },
      "DlvTime": {
        "name": "dlvtime",
        "in": "query",
        "required": false,
        "description": "Scheduled delivery time. Format: `YYYY/MM/DD hh24:mm:ss`. Leave blank to send immediately.",
        "schema": {
          "type": "string",
          "example": "2026/12/31 09:00:00"
        }
      },
      "WapUrl": {
        "name": "wapurl",
        "in": "query",
        "required": false,
        "description": "WAP Push destination URL. Only used when `encoding=PUSH`. Combined with `smbody` must be ≤ 88 bytes.",
        "schema": {
          "type": "string",
          "format": "uri",
          "example": "https://www.example.com"
        }
      },
      "ReplyUrl": {
        "name": "replyurl",
        "in": "query",
        "required": false,
        "description": "Callback URL to receive user reply messages (extra charge: +1 point per 10 messages). Only for `BIG5`/`ASCII`/`UCS2`. Max 300 characters.",
        "schema": {
          "type": "string",
          "format": "uri"
        }
      },
      "ReplyDays": {
        "name": "replydays",
        "in": "query",
        "required": false,
        "description": "Number of days to collect user replies. Default: 3, Max: 30. Only for `BIG5`/`ASCII`/`UCS2`.",
        "schema": {
          "type": "integer",
          "default": 3,
          "minimum": 1,
          "maximum": 30
        }
      },
      "ResponseCallback": {
        "name": "response",
        "in": "query",
        "required": false,
        "description": "Callback URL for delivery status reports. System POSTs status updates to this URL. Leave blank to disable.",
        "schema": {
          "type": "string",
          "format": "uri"
        }
      },
      "Rtype": {
        "name": "rtype",
        "in": "query",
        "required": false,
        "description": "Response format. Omit for plain text, `JSON` for JSON, `XML` for XML.",
        "schema": {
          "type": "string",
          "enum": [
            "JSON",
            "XML"
          ]
        }
      },
      "MsgId": {
        "name": "msgid",
        "in": "query",
        "required": true,
        "description": "Message ID returned from a successful send request.",
        "schema": {
          "type": "string",
          "example": "100101121234567"
        }
      },
      "MsgIdBulk": {
        "name": "msgid",
        "in": "query",
        "required": true,
        "description": "One or more message IDs separated by commas. Count must match `dstaddr`.",
        "schema": {
          "type": "string",
          "example": "100101121234567,100101121234568"
        }
      },
      "MsgIdCancel": {
        "name": "msgid",
        "in": "query",
        "required": true,
        "description": "Message ID of the scheduled SMS to cancel.",
        "schema": {
          "type": "string",
          "example": "100101121234567"
        }
      },
      "CodeLength": {
        "name": "codelength",
        "in": "query",
        "required": false,
        "description": "Length of the OTP verification code. Can be `4` or `6`. Default: `4`.",
        "schema": {
          "type": "integer",
          "enum": [
            4,
            6
          ],
          "default": 4
        }
      },
      "Domain": {
        "name": "domain",
        "in": "query",
        "required": false,
        "description": "Your registered domain name. Used in the OTP message body in the format `@domain #code` which enables iOS/Android auto-fill. Defaults to `smsgo.com.tw`. Must be pre-registered in your account's allowed URL list.",
        "schema": {
          "type": "string",
          "example": "example.com"
        }
      },
      "OtpCode": {
        "name": "OtpCode",
        "in": "query",
        "required": true,
        "description": "The OTP code entered by the user (4 or 6 digits).",
        "schema": {
          "type": "string",
          "pattern": "^[0-9]{4,6}$",
          "example": "123456"
        }
      },
      "SerialNumber": {
        "name": "serial_number",
        "in": "query",
        "required": true,
        "description": "The `msgid` returned from the Send OTP (`/verify.aspx`) request.",
        "schema": {
          "type": "string",
          "example": "100101121234567"
        }
      },
      "Resend": {
        "name": "resend",
        "in": "query",
        "required": false,
        "description": "Set to `true` to automatically resend a new OTP if the current one has expired (statuscode `-25`).",
        "schema": {
          "type": "boolean"
        }
      }
    },
    "schemas": {
      "AuthFields": {
        "type": "object",
        "required": [
          "username",
          "password"
        ],
        "properties": {
          "username": {
            "type": "string",
            "description": "Member account username",
            "example": "your_username"
          },
          "password": {
            "type": "string",
            "format": "password",
            "description": "Member password or API Key",
            "example": "your_password"
          }
        }
      },
      "RtypeField": {
        "type": "object",
        "properties": {
          "rtype": {
            "type": "string",
            "enum": [
              "JSON",
              "XML"
            ],
            "description": "Response format: JSON / XML / (blank = plain text)"
          }
        }
      },
      "SendSmsPayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AuthFields"
          },
          {
            "type": "object",
            "required": [
              "dstaddr",
              "smbody"
            ],
            "properties": {
              "dstaddr": {
                "type": "string",
                "description": "Recipient number(s), comma-separated, max 50",
                "example": "0912345678"
              },
              "smbody": {
                "type": "string",
                "description": "SMS content",
                "example": "Hello from SMSGO API"
              },
              "encoding": {
                "type": "string",
                "default": "BIG5",
                "enum": [
                  "BIG5",
                  "ASCII",
                  "UCS2",
                  "PBIG5",
                  "PASCII",
                  "LBIG5",
                  "LASCII",
                  "LUCS2",
                  "PUSH"
                ]
              },
              "dlvtime": {
                "type": "string",
                "description": "Scheduled time: YYYY/MM/DD hh24:mm:ss",
                "example": "2026/12/31 09:00:00"
              },
              "wapurl": {
                "type": "string",
                "format": "uri",
                "description": "WAP Push URL (encoding=PUSH only)"
              },
              "replyurl": {
                "type": "string",
                "format": "uri",
                "description": "Reply callback URL (extra charge, max 300 chars)"
              },
              "replydays": {
                "type": "integer",
                "default": 3,
                "minimum": 1,
                "maximum": 30,
                "description": "Days to collect replies (1–30)"
              },
              "response": {
                "type": "string",
                "format": "uri",
                "description": "Status report callback URL"
              },
              "rtype": {
                "type": "string",
                "enum": [
                  "JSON",
                  "XML"
                ],
                "description": "Response format"
              }
            }
          }
        ]
      },
      "QuerySmsPayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AuthFields"
          },
          {
            "type": "object",
            "required": [
              "msgid",
              "dstaddr"
            ],
            "properties": {
              "msgid": {
                "type": "string",
                "description": "Message ID from send response",
                "example": "100101121234567"
              },
              "dstaddr": {
                "type": "string",
                "description": "Recipient phone number",
                "example": "0912345678"
              },
              "rtype": {
                "type": "string",
                "enum": [
                  "JSON",
                  "XML"
                ],
                "description": "Response format"
              }
            }
          }
        ]
      },
      "QueryBulkPayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AuthFields"
          },
          {
            "type": "object",
            "required": [
              "msgid",
              "dstaddr"
            ],
            "properties": {
              "msgid": {
                "type": "string",
                "description": "Comma-separated message IDs",
                "example": "100101121234567,100101121234568"
              },
              "dstaddr": {
                "type": "string",
                "description": "Comma-separated phone numbers (count must match msgid)",
                "example": "0912345678,0987654321"
              },
              "rtype": {
                "type": "string",
                "enum": [
                  "JSON",
                  "XML"
                ],
                "description": "Response format"
              }
            }
          }
        ]
      },
      "QueryPointPayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AuthFields"
          },
          {
            "$ref": "#/components/schemas/RtypeField"
          }
        ]
      },
      "CancelSmsPayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AuthFields"
          },
          {
            "type": "object",
            "required": [
              "msgid"
            ],
            "properties": {
              "msgid": {
                "type": "string",
                "description": "Message ID to cancel",
                "example": "100101121234567"
              },
              "rtype": {
                "type": "string",
                "enum": [
                  "JSON",
                  "XML"
                ],
                "description": "Response format"
              }
            }
          }
        ]
      },
      "SendVerifyPayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AuthFields"
          },
          {
            "type": "object",
            "required": [
              "dstaddr"
            ],
            "properties": {
              "dstaddr": {
                "type": "string",
                "description": "Recipient phone number",
                "example": "0912345678"
              },
              "codelength": {
                "type": "integer",
                "enum": [
                  4,
                  6
                ],
                "default": 4,
                "description": "OTP length: 4 or 6"
              },
              "domain": {
                "type": "string",
                "description": "Your registered domain. Appended to the OTP body as `@domain #code` for iOS/Android auto-fill. Defaults to `smsgo.com.tw`. Must be pre-registered in your account.",
                "example": "example.com"
              },
              "dlvtime": {
                "type": "string",
                "description": "Scheduled time: YYYY/MM/DD hh24:mm:ss"
              },
              "response": {
                "type": "string",
                "format": "uri",
                "description": "Status callback URL"
              },
              "rtype": {
                "type": "string",
                "enum": [
                  "JSON",
                  "XML"
                ],
                "description": "Response format"
              }
            }
          }
        ]
      },
      "AckVerifyPayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AuthFields"
          },
          {
            "type": "object",
            "required": [
              "dstaddr",
              "OtpCode",
              "serial_number"
            ],
            "properties": {
              "dstaddr": {
                "type": "string",
                "description": "Recipient phone number",
                "example": "0912345678"
              },
              "OtpCode": {
                "type": "string",
                "pattern": "^[0-9]{4,6}$",
                "description": "OTP code entered by user",
                "example": "123456"
              },
              "serial_number": {
                "type": "string",
                "description": "msgid from Send OTP response",
                "example": "100101121234567"
              },
              "resend": {
                "type": "boolean",
                "description": "Resend new OTP if expired (statuscode -25)"
              },
              "dlvtime": {
                "type": "string",
                "description": "Resend scheduled time"
              },
              "response": {
                "type": "string",
                "format": "uri",
                "description": "Resend status callback URL"
              },
              "rtype": {
                "type": "string",
                "enum": [
                  "JSON",
                  "XML"
                ],
                "description": "Response format"
              }
            }
          }
        ]
      },
      "SendSmsCustomPayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AuthFields"
          },
          {
            "type": "object",
            "properties": {
              "csv": {
                "type": "string",
                "description": "CSV text — one `mobile,message` pair per line. Lines starting with `#` are skipped.",
                "example": "0912345678,Hello Alice\n0987654321,Hello Bob"
              },
              "messages": {
                "type": "array",
                "description": "Alternative to `csv` — array of message objects (JSON body only).",
                "items": {
                  "type": "object",
                  "required": [
                    "dstaddr",
                    "smbody"
                  ],
                  "properties": {
                    "dstaddr": {
                      "type": "string",
                      "example": "0912345678"
                    },
                    "smbody": {
                      "type": "string",
                      "example": "Hello Alice"
                    }
                  }
                }
              },
              "encoding": {
                "type": "string",
                "default": "BIG5",
                "enum": [
                  "BIG5",
                  "ASCII",
                  "UCS2",
                  "LBIG5",
                  "LASCII",
                  "LUCS2"
                ]
              },
              "dlvtime": {
                "type": "string",
                "example": "2026/12/31 09:00:00"
              }
            }
          }
        ]
      },
      "QueryReplyPayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AuthFields"
          },
          {
            "type": "object",
            "required": [
              "startdate",
              "enddate"
            ],
            "properties": {
              "startdate": {
                "type": "string",
                "description": "Start of date range. Format: `YYYY/MM/DD`.",
                "example": "2026/06/01"
              },
              "enddate": {
                "type": "string",
                "description": "End of date range. Format: `YYYY/MM/DD`.",
                "example": "2026/06/30"
              },
              "rtype": {
                "type": "string",
                "enum": [
                  "JSON",
                  "XML"
                ],
                "description": "Response format. Omit for plain text."
              }
            }
          }
        ],
        "example": {
          "username": "your_username",
          "password": "your_password",
          "startdate": "2026/06/01",
          "enddate": "2026/06/30",
          "rtype": "JSON"
        }
      },
      "QuerySentListPayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AuthFields"
          },
          {
            "type": "object",
            "required": [
              "startdate",
              "enddate"
            ],
            "properties": {
              "startdate": {
                "type": "string",
                "description": "Start of send date range. Format: `YYYY/MM/DD`.",
                "example": "2026/06/01"
              },
              "enddate": {
                "type": "string",
                "description": "End of send date range. Format: `YYYY/MM/DD`. Max range: 31 days.",
                "example": "2026/06/30"
              },
              "dstaddr": {
                "type": "string",
                "description": "Optional filter by recipient phone number.",
                "example": "0912345678"
              },
              "page": {
                "type": "integer",
                "description": "Page number for pagination. Default: `1`.",
                "default": 1,
                "minimum": 1
              },
              "pagesize": {
                "type": "integer",
                "description": "Records per page. Default: `50`. Max: `200`.",
                "default": 50,
                "minimum": 1,
                "maximum": 200
              },
              "rtype": {
                "type": "string",
                "enum": [
                  "JSON",
                  "XML"
                ],
                "description": "Response format. Omit for plain text."
              }
            }
          }
        ],
        "example": {
          "username": "your_username",
          "password": "your_password",
          "startdate": "2026/06/01",
          "enddate": "2026/06/30",
          "page": 1,
          "pagesize": 50,
          "rtype": "JSON"
        }
      },
      "MoWebHookPayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AuthFields"
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "enum": [
                  "set",
                  "get",
                  "clear"
                ],
                "default": "set",
                "description": "Action: `set` saves the URL, `get` returns the current URL, `clear` removes it."
              },
              "webhookurl": {
                "type": "string",
                "format": "uri",
                "description": "Webhook URL to receive MO messages (required when `action=set`). Must start with `http://` or `https://`. Max 500 characters.",
                "example": "https://abc.trycloudflare.com/mo_receive"
              },
              "rtype": {
                "type": "string",
                "enum": [
                  "JSON",
                  "XML"
                ],
                "description": "Response format. Omit for plain text."
              }
            }
          }
        ]
      }
    },
    "responses": {
      "SmsApiResponse": {
        "description": "API response. Format determined by `rtype` parameter. `statuscode=0` means success.\n\n**Error Codes:**\n\n| Code | Description |\n|:---|:---|\n| `0` | Success |\n| `-1` | CGI string error |\n| `-2` | Username, password, or IP error |\n| `-3` | Username or password empty |\n| `-5` | Phone number format error |\n| `-8` | Insufficient points |\n| `-9` | Too many recipients (max 50) |\n| `-10` | Send failed |\n| `-11` | Database error |\n| `-12` | Message body empty |\n| `-13` | Parameter count mismatch |\n| `-14` | Fraud keyword detected |\n| `-15` | IP address not allowed |\n| `-16` | API service not enabled |\n| `-17` | Callback URL not allowed |\n| `-18` | Off-net number |\n| `-19` | Number blocked |\n| `-20` | Marked as SPAM |\n| `-21` | Capacity reached |\n| `-22` | Request rerouted |\n| `-23` | No signature |\n| `-24` | OTP verification failed |\n| `-25` | OTP expired |\n| `-30` | Operator system ID error |",
        "content": {
          "text/plain": {
            "schema": {
              "type": "string"
            },
            "examples": {
              "Success": {
                "summary": "Success",
                "value": "msgid=100101121234567\nstatuscode=0\nstatusstr=OK\npoint=1"
              },
              "Error": {
                "summary": "Error",
                "value": "msgid=-3\nstatuscode=-3\nstatusstr=username or password empty!\npoint=0"
              },
              "OtpVerifyFail": {
                "summary": "OTP wrong code (-24)",
                "value": "msgid=-24\nstatuscode=-24\nstatusstr=Verify Fail\npoint=0"
              },
              "OtpExpired": {
                "summary": "OTP expired (-25)",
                "value": "msgid=-25\nstatuscode=-25\nstatusstr=Verify Expired\npoint=0"
              }
            }
          },
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "result": {
                  "type": "object",
                  "properties": {
                    "msgid": {
                      "type": "string"
                    },
                    "statuscode": {
                      "type": "string"
                    },
                    "statusstr": {
                      "type": "string"
                    },
                    "point": {
                      "type": "integer"
                    }
                  }
                }
              }
            },
            "examples": {
              "Success": {
                "summary": "Success",
                "value": {
                  "result": {
                    "msgid": "1504280910499665",
                    "statuscode": "0",
                    "statusstr": "OK",
                    "point": 1
                  }
                }
              },
              "Error": {
                "summary": "Error",
                "value": {
                  "result": {
                    "msgid": "-3",
                    "statuscode": "-3",
                    "statusstr": "username or password empty!",
                    "point": 0
                  }
                }
              },
              "OtpVerifyFail": {
                "summary": "OTP wrong code (-24)",
                "value": {
                  "result": {
                    "msgid": "-24",
                    "statuscode": "-24",
                    "statusstr": "Verify Fail",
                    "point": 0
                  }
                }
              },
              "OtpExpired": {
                "summary": "OTP expired (-25)",
                "value": {
                  "result": {
                    "msgid": "-25",
                    "statuscode": "-25",
                    "statusstr": "Verify Expired",
                    "point": 0
                  }
                }
              }
            }
          },
          "application/xml": {
            "schema": {
              "type": "object",
              "xml": {
                "name": "response"
              },
              "properties": {
                "code": {
                  "type": "string"
                },
                "msgid": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                }
              }
            },
            "examples": {
              "Success": {
                "summary": "Success",
                "value": "<response><code>0</code><msgid>1688888</msgid><text>Success</text></response>"
              },
              "Error": {
                "summary": "Error",
                "value": "<response><code>-1</code><msgid></msgid><text>Username or Password Empty</text></response>"
              },
              "OtpVerifyFail": {
                "summary": "OTP wrong code (-24)",
                "value": "<response><code>-24</code><msgid>-24</msgid><text>Verify Fail</text></response>"
              },
              "OtpExpired": {
                "summary": "OTP expired (-25)",
                "value": "<response><code>-25</code><msgid>-25</msgid><text>Verify Expired</text></response>"
              }
            }
          }
        }
      },
      "SendSmsApiResponse": {
        "description": "API Send SMS response. Format determined by `rtype` parameter. `statuscode=0` means success.\n\n**Error Codes:**\n\n| Code | Description |\n|:---|:---|\n| `0` | Success |\n| `-1` | CGI string error |\n| `-2` | Username, password, or IP error |\n| `-3` | Username or password empty |\n| `-5` | Phone number format error |\n| `-8` | Insufficient points |\n| `-9` | Too many recipients (max 50) |\n| `-10` | Send failed |\n| `-11` | Database error |\n| `-12` | Message body empty |\n| `-13` | Parameter count mismatch |\n| `-14` | Fraud keyword detected |\n| `-15` | IP address not allowed |\n| `-16` | API service not enabled |\n| `-17` | Callback URL not allowed |\n| `-18` | Off-net number |\n| `-19` | Number blocked |\n| `-20` | Marked as SPAM |\n| `-21` | Capacity reached |\n| `-22` | Request rerouted |\n| `-23` | No signature |\n| `-24` | OTP verification failed |\n| `-25` | OTP expired |\n| `-30` | Operator system ID error |",
        "content": {
          "text/plain": {
            "schema": {
              "type": "string"
            },
            "examples": {
              "Success": {
                "summary": "Success",
                "value": "msgid=100101121234567\nstatuscode=0\nstatusstr=OK\npoint=1"
              },
              "Error": {
                "summary": "Error",
                "value": "msgid=-3\nstatuscode=-3\nstatusstr=username or password empty!\npoint=0"
              }
            }
          },
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "result": {
                  "type": "object",
                  "properties": {
                    "msgid": {
                      "type": "string"
                    },
                    "statuscode": {
                      "type": "string"
                    },
                    "statusstr": {
                      "type": "string"
                    },
                    "point": {
                      "type": "integer"
                    }
                  }
                }
              }
            },
            "examples": {
              "Success": {
                "summary": "Success",
                "value": {
                  "result": {
                    "msgid": "1504280910499665",
                    "statuscode": "0",
                    "statusstr": "OK",
                    "point": 1
                  }
                }
              },
              "Error": {
                "summary": "Error",
                "value": {
                  "result": {
                    "msgid": "-3",
                    "statuscode": "-3",
                    "statusstr": "username or password empty!",
                    "point": 0
                  }
                }
              }
            }
          },
          "application/xml": {
            "schema": {
              "type": "object",
              "xml": {
                "name": "response"
              },
              "properties": {
                "code": {
                  "type": "string"
                },
                "msgid": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                }
              }
            },
            "examples": {
              "Success": {
                "summary": "Success",
                "value": "<response><code>0</code><msgid>1688888</msgid><text>Success</text></response>"
              },
              "Error": {
                "summary": "Error",
                "value": "<response><code>-1</code><msgid></msgid><text>Username or Password Empty</text></response>"
              }
            }
          }
        }
      }
    }
  },
  "security": [],
  "paths": {
    "/sms_gw/sendsms.aspx": {
      "get": {
        "tags": [
          "SMS"
        ],
        "operationId": "sendSmsGet",
        "deprecated": true,
        "summary": "Send SMS (GET) ⚠ Deprecated",
        "description": "⚠ **Deprecated** — Use POST instead. Credentials appear in server logs.\n\nSend SMS via GET query parameters. All values must be URL-encoded.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Username"
          },
          {
            "$ref": "#/components/parameters/Password"
          },
          {
            "$ref": "#/components/parameters/DstAddr"
          },
          {
            "$ref": "#/components/parameters/SmBody"
          },
          {
            "$ref": "#/components/parameters/Encoding"
          },
          {
            "$ref": "#/components/parameters/DlvTime"
          },
          {
            "$ref": "#/components/parameters/WapUrl"
          },
          {
            "$ref": "#/components/parameters/ReplyUrl"
          },
          {
            "$ref": "#/components/parameters/ReplyDays"
          },
          {
            "$ref": "#/components/parameters/ResponseCallback"
          },
          {
            "$ref": "#/components/parameters/Rtype"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/SendSmsApiResponse"
          }
        },
        "x-internal": true,
        "x-codeSamples": [
          {
            "lang": "cURL",
            "label": "cURL",
            "source": "curl \"https://www.smsgo.com.tw/sms_gw/sendsms.aspx?username=your_username&password=your_password&dstaddr=0912345678&smbody=Test\""
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "fetch('https://www.smsgo.com.tw/sms_gw/sendsms.aspx?username=your_username&password=your_password&dstaddr=0912345678&smbody=Test', {\n    method: 'GET'\n})\n.then(response => response.text())\n.then(result => console.log(result))\n.catch(error => console.log('error', error));"
          },
          {
            "lang": "C#",
            "label": "C#",
            "source": "using System;\nusing System.Net.Http;\nusing System.Threading.Tasks;\n\nclass Program\n{\n    static async Task Main(string[] args)\n    {\n        var client = new HttpClient();\n        var request = new HttpRequestMessage(HttpMethod.Get, \"https://www.smsgo.com.tw/sms_gw/sendsms.aspx?username=your_username&password=your_password&dstaddr=0912345678&smbody=Test\");\n        var response = await client.SendAsync(request);\n        response.EnsureSuccessStatusCode();\n        Console.WriteLine(await response.Content.ReadAsStringAsync());\n    }\n}"
          },
          {
            "lang": "PHP",
            "label": "PHP",
            "source": "<?php\n\n$url = 'https://www.smsgo.com.tw/sms_gw/sendsms.aspx?username=your_username&password=your_password&dstaddr=0912345678&smbody=Test';\n$result = file_get_contents($url);\n\nif ($result === FALSE) {\n    /* Handle error */\n    echo \"Error sending request.\";\n}\n\nvar_dump($result);\n\n?>\n"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nurl = 'https://www.smsgo.com.tw/sms_gw/sendsms.aspx?username=your_username&password=your_password&dstaddr=0912345678&smbody=Test'\n\ntry:\n    response = requests.get(url)\n    response.raise_for_status()\n    print(\"Response from server:\")\n    print(response.text)\nexcept requests.exceptions.RequestException as e:\n    print(f\"An error occurred: {e}\")\n"
          },
          {
            "lang": "Java",
            "label": "Java",
            "source": "import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class SmsGoExample {\n    public static void main(String[] args) throws Exception {\n        HttpClient client = HttpClient.newHttpClient();\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://www.smsgo.com.tw/sms_gw/sendsms.aspx?username=your_username&password=your_password&dstaddr=0912345678&smbody=Test\"))\n                .GET()\n                .build();\n\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}"
          }
        ]
      },
      "post": {
        "tags": [
          "SMS"
        ],
        "operationId": "sendSmsPost",
        "summary": "Send SMS (POST)",
        "description": "Send an SMS message. Accepts `application/x-www-form-urlencoded` or `application/json`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SendSmsPayload"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendSmsPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/SendSmsApiResponse"
          }
        },
        "x-codeSamples": [
          {
            "lang": "cURL",
            "label": "cURL",
            "source": "curl -X POST -d 'username=your_username&password=your_password&dstaddr=0912345678&smbody=Test' https://www.smsgo.com.tw/sms_gw/sendsms.aspx"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "const myHeaders = new Headers();\nmyHeaders.append(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\nconst urlencoded = new URLSearchParams();\nurlencoded.append(\"username\", \"your_username\");\nurlencoded.append(\"password\", \"your_password\");\nurlencoded.append(\"dstaddr\", \"0912345678\");\nurlencoded.append(\"smbody\", \"Test\");\n\nconst requestOptions = {\n  method: 'POST',\n  headers: myHeaders,\n  body: urlencoded,\n  redirect: 'follow'\n};\n\nfetch(\"https://www.smsgo.com.tw/sms_gw/sendsms.aspx\", requestOptions)\n  .then(response => response.text())\n  .then(result => console.log(result))\n  .catch(error => console.log('error', error));"
          },
          {
            "lang": "C#",
            "label": "C#",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Net.Http;\nusing System.Threading.Tasks;\n\npublic class SmsGoExample\n{\n    public static async Task Main(string[] args)\n    {\n        var client = new HttpClient();\n        var values = new Dictionary<string, string>\n        {\n            { \"username\", \"your_username\" },\n            { \"password\", \"your_password\" },\n            { \"dstaddr\", \"0912345678\" },\n            { \"smbody\", \"This is a test message from C#.\" }\n        };\n\n        var content = new FormUrlEncodedContent(values);\n        var response = await client.PostAsync(\"https://www.smsgo.com.tw/sms_gw/sendsms.aspx\", content);\n        var responseString = await response.Content.ReadAsStringAsync();\n\n        Console.WriteLine(responseString);\n    }\n}\n"
          },
          {
            "lang": "PHP",
            "label": "PHP",
            "source": "<?php\n\n$url = 'https://www.smsgo.com.tw/sms_gw/sendsms.aspx';\n$data = array(\n    'username' => 'your_username',\n    'password' => 'your_password',\n    'dstaddr' => '0912345678',\n    'smbody' => 'This is a test message from PHP.'\n);\n\n$options = array(\n    'http' => array(\n        'header'  => \"Content-type: application/x-www-form-urlencoded\\r\\n\",\n        'method'  => 'POST',\n        'content' => http_build_query($data)\n    )\n);\n$context  = stream_context_create($options);\n$result = file_get_contents($url, false, $context);\n\nif ($result === FALSE) {\n    /* Handle error */\n    echo \"Error sending request.\";\n}\n\nvar_dump($result);\n\n?>\n"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nurl = 'https://www.smsgo.com.tw/sms_gw/sendsms.aspx'\npayload = {\n    'username': 'your_username',\n    'password': 'your_password',\n    'dstaddr': '0912345678',\n    'smbody': 'This is a test message from Python.'\n}\n\ntry:\n    response = requests.post(url, data=payload)\n    response.raise_for_status()  # Raise an exception for bad status codes\n    print(\"Response from server:\")\n    print(response.text)\nexcept requests.exceptions.RequestException as e:\n    print(f\"An error occurred: {e}\")\n"
          },
          {
            "lang": "Java",
            "label": "Java",
            "source": "import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class SmsGoExample {\n    public static void main(String[] args) throws Exception {\n        HttpClient client = HttpClient.newHttpClient();\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://www.smsgo.com.tw/sms_gw/sendsms.aspx\"))\n                .header(\"Content-Type\", \"application/x-www-form-urlencoded\")\n                .POST(HttpRequest.BodyPublishers.ofString(\"username=your_username&password=your_password&dstaddr=0912345678&smbody=Test\"))\n                .build();\n\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}"
          }
        ]
      }
    },
    "/sms_gw/query.aspx": {
      "get": {
        "tags": [
          "Query"
        ],
        "operationId": "querySmsStatusGet",
        "deprecated": true,
        "summary": "Query SMS Status (GET) ⚠ Deprecated",
        "description": "⚠ **Deprecated** — Use POST instead.\n\nQuery delivery status of a single SMS.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Username"
          },
          {
            "$ref": "#/components/parameters/Password"
          },
          {
            "$ref": "#/components/parameters/MsgId"
          },
          {
            "$ref": "#/components/parameters/DstAddr"
          },
          {
            "$ref": "#/components/parameters/Rtype"
          }
        ],
        "responses": {
          "200": {
            "description": "Delivery status. Plain text format: `statusCode|statusStr|cellphone`\n\n**statusStr values:** `DELIVRD`, `REJECTD`, `EXPIRED`, `UNDELIV`, `UNKNOWN`, `ENROUTE`",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "examples": {
                  "Delivered": {
                    "summary": "Delivered",
                    "value": "0|DELIVRD|0912345678"
                  },
                  "SerialNotFound": {
                    "summary": "Serial number not found",
                    "value": "-2|-2|can not find this serial number!"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "statusCode": {
                                "type": "string"
                              },
                              "statusStr": {
                                "type": "string"
                              },
                              "cellphone": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Success": {
                    "summary": "Delivered",
                    "value": {
                      "results": {
                        "result": [
                          {
                            "statusCode": "0",
                            "statusStr": "DELIVRD",
                            "cellphone": "0912345678"
                          }
                        ]
                      }
                    }
                  },
                  "SerialNotFound": {
                    "summary": "Serial number not found",
                    "value": {
                      "result": {
                        "msgid": "-1",
                        "statuscode": "-1",
                        "statusstr": "CGI string error!!",
                        "point": 0
                      }
                    }
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "xml": {
                    "name": "results"
                  },
                  "properties": {
                    "result": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "statusCode": {
                            "type": "string"
                          },
                          "statusStr": {
                            "type": "string"
                          },
                          "cellphone": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Success": {
                    "summary": "Success",
                    "value": "<results><result><statusCode>0</statusCode><statusStr>DELIVRD</statusStr><cellphone>0912345678</cellphone></result></results>"
                  },
                  "SerialNotFound": {
                    "summary": "Serial number not found",
                    "value": "<results><r><statusCode>-2</statusCode><statusStr>can not find this serial number!</statusStr></r></results>"
                  }
                }
              }
            }
          }
        },
        "x-internal": true,
        "x-codeSamples": [
          {
            "lang": "cURL",
            "label": "cURL",
            "source": "curl \"https://www.smsgo.com.tw/sms_gw/query.aspx?username=your_username&password=your_password&msgid=12345&dstaddr=0912345678\""
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "fetch('https://www.smsgo.com.tw/sms_gw/query.aspx?username=your_username&password=your_password&msgid=12345&dstaddr=0912345678', {\n    method: 'GET'\n})\n.then(response => response.text())\n.then(result => console.log(result))\n.catch(error => console.log('error', error));"
          },
          {
            "lang": "C#",
            "label": "C#",
            "source": "using System;\nusing System.Net.Http;\nusing System.Threading.Tasks;\n\nclass Program\n{\n    static async Task Main(string[] args)\n    {\n        var client = new HttpClient();\n        var request = new HttpRequestMessage(HttpMethod.Get, \"https://www.smsgo.com.tw/sms_gw/query.aspx?username=your_username&password=your_password&msgid=12345&dstaddr=0912345678\");\n        var response = await client.SendAsync(request);\n        response.EnsureSuccessStatusCode();\n        Console.WriteLine(await response.Content.ReadAsStringAsync());\n    }\n}"
          },
          {
            "lang": "PHP",
            "label": "PHP",
            "source": "<?php\n\n$url = 'https://www.smsgo.com.tw/sms_gw/query.aspx?username=your_username&password=your_password&msgid=12345&dstaddr=0912345678';\n$result = file_get_contents($url);\n\nif ($result === FALSE) {\n    /* Handle error */\n    echo \"Error sending request.\";\n}\n\nvar_dump($result);\n\n?>\n"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nurl = 'https://www.smsgo.com.tw/sms_gw/query.aspx?username=your_username&password=your_password&msgid=12345&dstaddr=0912345678'\n\ntry:\n    response = requests.get(url)\n    response.raise_for_status()\n    print(\"Response from server:\")\n    print(response.text)\nexcept requests.exceptions.RequestException as e:\n    print(f\"An error occurred: {e}\")\n"
          },
          {
            "lang": "Java",
            "label": "Java",
            "source": "import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class SmsGoExample {\n    public static void main(String[] args) throws Exception {\n        HttpClient client = HttpClient.newHttpClient();\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://www.smsgo.com.tw/sms_gw/query.aspx?username=your_username&password=your_password&msgid=12345&dstaddr=0912345678\"))\n                .GET()\n                .build();\n\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}"
          }
        ]
      },
      "post": {
        "tags": [
          "Query"
        ],
        "operationId": "querySmsStatusPost",
        "summary": "Query SMS Status (POST)",
        "description": "Query delivery status of a single SMS via POST. Accepts `application/x-www-form-urlencoded` or `application/json`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/QuerySmsPayload"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuerySmsPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Delivery status. Plain text: `statusCode|statusStr|cellphone`\n\n**statusStr values:** `DELIVRD`, `REJECTD`, `EXPIRED`, `UNDELIV`, `UNKNOWN`, `ENROUTE`",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "examples": {
                  "Success": {
                    "summary": "Delivered",
                    "value": "0|DELIVRD|0912345678"
                  },
                  "SerialNotFound": {
                    "summary": "Serial number not found",
                    "value": "-2|-2|can not find this serial number!"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "statusCode": {
                                "type": "string"
                              },
                              "statusStr": {
                                "type": "string"
                              },
                              "cellphone": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Success": {
                    "summary": "Delivered",
                    "value": {
                      "results": {
                        "result": [
                          {
                            "statusCode": "0",
                            "statusStr": "DELIVRD",
                            "cellphone": "0912345678"
                          }
                        ]
                      }
                    }
                  },
                  "SerialNotFound": {
                    "summary": "Serial number not found",
                    "value": {
                      "result": {
                        "msgid": "-1",
                        "statuscode": "-1",
                        "statusstr": "CGI string error!!",
                        "point": 0
                      }
                    }
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "xml": {
                    "name": "results"
                  },
                  "properties": {
                    "result": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "statusCode": {
                            "type": "string"
                          },
                          "statusStr": {
                            "type": "string"
                          },
                          "cellphone": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Success": {
                    "summary": "Success",
                    "value": "<results><result><statusCode>0</statusCode><statusStr>DELIVRD</statusStr><cellphone>0912345678</cellphone></result></results>"
                  },
                  "SerialNotFound": {
                    "summary": "Serial number not found",
                    "value": "<results><r><statusCode>-2</statusCode><statusStr>can not find this serial number!</statusStr></r></results>"
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "cURL",
            "label": "cURL",
            "source": "curl -X POST -d 'username=your_username&password=your_password&msgid=12345&dstaddr=0912345678' https://www.smsgo.com.tw/sms_gw/query.aspx"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "const myHeaders = new Headers();\nmyHeaders.append(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\nconst urlencoded = new URLSearchParams();\nurlencoded.append(\"username\", \"your_username\");\nurlencoded.append(\"password\", \"your_password\");\nurlencoded.append(\"msgid\", \"12345\");\nurlencoded.append(\"dstaddr\", \"0912345678\");\n\nconst requestOptions = {\n  method: 'POST',\n  headers: myHeaders,\n  body: urlencoded,\n  redirect: 'follow'\n};\n\nfetch(\"https://www.smsgo.com.tw/sms_gw/query.aspx\", requestOptions)\n  .then(response => response.text())\n  .then(result => console.log(result))\n  .catch(error => console.log('error', error));"
          },
          {
            "lang": "C#",
            "label": "C#",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Net.Http;\nusing System.Threading.Tasks;\n\npublic class SmsGoExample\n{\n    public static async Task Main(string[] args)\n    {\n        var client = new HttpClient();\n        var values = new Dictionary<string, string>\n        {\n            { \"username\", \"your_username\" },\n            { \"password\", \"your_password\" },\n            { \"msgid\", \"12345\" },\n            { \"dstaddr\", \"0912345678\" }\n        };\n\n        var content = new FormUrlEncodedContent(values);\n        var response = await client.PostAsync(\"https://www.smsgo.com.tw/sms_gw/query.aspx\", content);\n        var responseString = await response.Content.ReadAsStringAsync();\n\n        Console.WriteLine(responseString);\n    }\n}\n"
          },
          {
            "lang": "PHP",
            "label": "PHP",
            "source": "<?php\n\n$url = 'https://www.smsgo.com.tw/sms_gw/query.aspx';\n$data = array(\n    'username' => 'your_username',\n    'password' => 'your_password',\n    'msgid' => '12345',\n    'dstaddr' => '0912345678'\n);\n\n$options = array(\n    'http' => array(\n        'header'  => \"Content-type: application/x-www-form-urlencoded\\r\\n\",\n        'method'  => 'POST',\n        'content' => http_build_query($data)\n    )\n);\n$context  = stream_context_create($options);\n$result = file_get_contents($url, false, $context);\n\nif ($result === FALSE) {\n    /* Handle error */\n    echo \"Error sending request.\";\n}\n\nvar_dump($result);\n\n?>\n"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nurl = 'https://www.smsgo.com.tw/sms_gw/query.aspx'\npayload = {\n    'username': 'your_username',\n    'password': 'your_password',\n    'msgid': '12345',\n    'dstaddr': '0912345678'\n}\n\ntry:\n    response = requests.post(url, data=payload)\n    response.raise_for_status()  # Raise an exception for bad status codes\n    print(\"Response from server:\")\n    print(response.text)\nexcept requests.exceptions.RequestException as e:\n    print(f\"An error occurred: {e}\")\n"
          },
          {
            "lang": "Java",
            "label": "Java",
            "source": "import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class SmsGoExample {\n    public static void main(String[] args) throws Exception {\n        HttpClient client = HttpClient.newHttpClient();\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://www.smsgo.com.tw/sms_gw/query.aspx\"))\n                .header(\"Content-Type\", \"application/x-www-form-urlencoded\")\n                .POST(HttpRequest.BodyPublishers.ofString(\"username=your_username&password=your_password&msgid=12345&dstaddr=0912345678\"))\n                .build();\n\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}"
          }
        ]
      }
    },
    "/sms_gw/queryBulk.aspx": {
      "get": {
        "tags": [
          "Query"
        ],
        "operationId": "queryBulkSmsStatusGet",
        "deprecated": true,
        "summary": "Query Bulk SMS Status (GET) ⚠ Deprecated",
        "description": "⚠ **Deprecated** — Use POST instead.\n\nQuery delivery status of multiple SMS. `msgid` and `dstaddr` are comma-separated and counts must match.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Username"
          },
          {
            "$ref": "#/components/parameters/Password"
          },
          {
            "$ref": "#/components/parameters/MsgIdBulk"
          },
          {
            "$ref": "#/components/parameters/DstAddrBulk"
          },
          {
            "$ref": "#/components/parameters/Rtype"
          }
        ],
        "responses": {
          "200": {
            "description": "Multiple records separated by `\\r\\n`. Each record: `statusCode|statusStr|cellphone|msgid`",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "examples": {
                  "Success": {
                    "summary": "Success",
                    "value": "0|DELIVRD|0912345678|100101121234567\r\n4|REJECTD|0987654321|100101121234568"
                  },
                  "SerialNotFound": {
                    "summary": "Serial number not found",
                    "value": "-2|-2|can not find this serial number!"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "statusCode": {
                                "type": "string"
                              },
                              "statusStr": {
                                "type": "string"
                              },
                              "cellphone": {
                                "type": "string"
                              },
                              "msgid": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Success": {
                    "summary": "Success",
                    "value": {
                      "results": {
                        "result": [
                          {
                            "statusCode": "0",
                            "statusStr": "DELIVRD",
                            "cellphone": "0912345678",
                            "msgid": "100101121234567"
                          },
                          {
                            "statusCode": "4",
                            "statusStr": "REJECTD",
                            "cellphone": "0987654321",
                            "msgid": "100101121234568"
                          }
                        ]
                      }
                    }
                  },
                  "SerialNotFound": {
                    "summary": "Serial number not found",
                    "value": {
                      "result": {
                        "msgid": "-1",
                        "statuscode": "-1",
                        "statusstr": "CGI string error!!",
                        "point": 0
                      }
                    }
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "xml": {
                    "name": "results"
                  },
                  "properties": {
                    "result": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "statusCode": {
                            "type": "string"
                          },
                          "statusStr": {
                            "type": "string"
                          },
                          "cellphone": {
                            "type": "string"
                          },
                          "msgid": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Success": {
                    "summary": "Success",
                    "value": "<results><result><statusCode>0</statusCode><statusStr>DELIVRD</statusStr><cellphone>0912345678</cellphone><msgid>100101121234567</msgid></result><result><statusCode>4</statusCode><statusStr>REJECTD</statusStr><cellphone>0987654321</cellphone><msgid>100101121234568</msgid></result></results>"
                  },
                  "SerialNotFound": {
                    "summary": "Serial number not found",
                    "value": "<results><r><statusCode>-2</statusCode><statusStr>can not find this serial number!</statusStr></r></results>"
                  }
                }
              }
            }
          }
        },
        "x-internal": true,
        "x-codeSamples": [
          {
            "lang": "cURL",
            "label": "cURL",
            "source": "curl \"https://www.smsgo.com.tw/sms_gw/queryBulk.aspx?username=your_username&password=your_password&msgid=12345,12346&dstaddr=0912345678,0987654321\""
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "fetch('https://www.smsgo.com.tw/sms_gw/queryBulk.aspx?username=your_username&password=your_password&msgid=12345,12346&dstaddr=0912345678,0987654321', {\n    method: 'GET'\n})\n.then(response => response.text())\n.then(result => console.log(result))\n.catch(error => console.log('error', error));"
          },
          {
            "lang": "C#",
            "label": "C#",
            "source": "using System;\nusing System.Net.Http;\nusing System.Threading.Tasks;\n\nclass Program\n{\n    static async Task Main(string[] args)\n    {\n        var client = new HttpClient();\n        var request = new HttpRequestMessage(HttpMethod.Get, \"https://www.smsgo.com.tw/sms_gw/queryBulk.aspx?username=your_username&password=your_password&msgid=12345,12346&dstaddr=0912345678,0987654321\");\n        var response = await client.SendAsync(request);\n        response.EnsureSuccessStatusCode();\n        Console.WriteLine(await response.Content.ReadAsStringAsync());\n    }\n}"
          },
          {
            "lang": "PHP",
            "label": "PHP",
            "source": "<?php\n\n$url = 'https://www.smsgo.com.tw/sms_gw/queryBulk.aspx?username=your_username&password=your_password&msgid=12345,12346&dstaddr=0912345678,0987654321';\n$result = file_get_contents($url);\n\nif ($result === FALSE) {\n    echo \"Error sending request.\";\n}\n\nvar_dump($result);\n\n?>\n"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nurl = 'https://www.smsgo.com.tw/sms_gw/queryBulk.aspx?username=your_username&password=your_password&msgid=12345,12346&dstaddr=0912345678,0987654321'\n\ntry:\n    response = requests.get(url)\n    response.raise_for_status()\n    print(response.text)\nexcept requests.exceptions.RequestException as e:\n    print(f\"An error occurred: {e}\")\n"
          },
          {
            "lang": "Java",
            "label": "Java",
            "source": "import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class SmsGoExample {\n    public static void main(String[] args) throws Exception {\n        HttpClient client = HttpClient.newHttpClient();\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://www.smsgo.com.tw/sms_gw/queryBulk.aspx?username=your_username&password=your_password&msgid=12345,12346&dstaddr=0912345678,0987654321\"))\n                .GET()\n                .build();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}"
          }
        ]
      },
      "post": {
        "tags": [
          "Query"
        ],
        "operationId": "queryBulkSmsStatusPost",
        "summary": "Query Bulk SMS Status (POST)",
        "description": "Query delivery status of multiple SMS via POST. `msgid` and `dstaddr` are comma-separated and counts must match. Accepts `application/x-www-form-urlencoded` or `application/json`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/QueryBulkPayload"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryBulkPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Multiple records separated by `\\r\\n`. Each record: `statusCode|statusStr|cellphone|msgid`",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "examples": {
                  "Success": {
                    "summary": "Success",
                    "value": "0|DELIVRD|0912345678|100101121234567\r\n4|REJECTD|0987654321|100101121234568"
                  },
                  "SerialNotFound": {
                    "summary": "Serial number not found",
                    "value": "-2|-2|can not find this serial number!"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "statusCode": {
                                "type": "string"
                              },
                              "statusStr": {
                                "type": "string"
                              },
                              "cellphone": {
                                "type": "string"
                              },
                              "msgid": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Success": {
                    "summary": "Success",
                    "value": {
                      "results": {
                        "result": [
                          {
                            "statusCode": "0",
                            "statusStr": "DELIVRD",
                            "cellphone": "0912345678",
                            "msgid": "100101121234567"
                          }
                        ]
                      }
                    }
                  },
                  "SerialNotFound": {
                    "summary": "Serial number not found",
                    "value": {
                      "result": {
                        "msgid": "-1",
                        "statuscode": "-1",
                        "statusstr": "CGI string error!!",
                        "point": 0
                      }
                    }
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "xml": {
                    "name": "results"
                  },
                  "properties": {
                    "result": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "statusCode": {
                            "type": "string"
                          },
                          "statusStr": {
                            "type": "string"
                          },
                          "cellphone": {
                            "type": "string"
                          },
                          "msgid": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Success": {
                    "summary": "Success",
                    "value": "<results><result><statusCode>0</statusCode><statusStr>DELIVRD</statusStr><cellphone>0912345678</cellphone><msgid>100101121234567</msgid></result><result><statusCode>4</statusCode><statusStr>REJECTD</statusStr><cellphone>0987654321</cellphone><msgid>100101121234568</msgid></result></results>"
                  },
                  "SerialNotFound": {
                    "summary": "Serial number not found",
                    "value": "<results><r><statusCode>-2</statusCode><statusStr>can not find this serial number!</statusStr></r></results>"
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "cURL",
            "label": "cURL",
            "source": "curl -X POST -d 'username=your_username&password=your_password&msgid=12345,12346&dstaddr=0912345678,0987654321' https://www.smsgo.com.tw/sms_gw/queryBulk.aspx"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "const myHeaders = new Headers();\nmyHeaders.append(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\nconst urlencoded = new URLSearchParams();\nurlencoded.append(\"username\", \"your_username\");\nurlencoded.append(\"password\", \"your_password\");\nurlencoded.append(\"msgid\", \"12345,12346\");\nurlencoded.append(\"dstaddr\", \"0912345678,0987654321\");\n\nconst requestOptions = {\n  method: 'POST',\n  headers: myHeaders,\n  body: urlencoded,\n  redirect: 'follow'\n};\n\nfetch(\"https://www.smsgo.com.tw/sms_gw/queryBulk.aspx\", requestOptions)\n  .then(response => response.text())\n  .then(result => console.log(result))\n  .catch(error => console.log('error', error));"
          },
          {
            "lang": "C#",
            "label": "C#",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Net.Http;\nusing System.Threading.Tasks;\n\npublic class SmsGoExample\n{\n    public static async Task Main(string[] args)\n    {\n        var client = new HttpClient();\n        var values = new Dictionary<string, string>\n        {\n            { \"username\", \"your_username\" },\n            { \"password\", \"your_password\" },\n            { \"msgid\", \"12345,12346\" },\n            { \"dstaddr\", \"0912345678,0987654321\" }\n        };\n\n        var content = new FormUrlEncodedContent(values);\n        var response = await client.PostAsync(\"https://www.smsgo.com.tw/sms_gw/queryBulk.aspx\", content);\n        var responseString = await response.Content.ReadAsStringAsync();\n\n        Console.WriteLine(responseString);\n    }\n}\n"
          },
          {
            "lang": "PHP",
            "label": "PHP",
            "source": "<?php\n\n$url = 'https://www.smsgo.com.tw/sms_gw/queryBulk.aspx';\n$data = array(\n    'username' => 'your_username',\n    'password' => 'your_password',\n    'msgid' => '12345,12346',\n    'dstaddr' => '0912345678,0987654321'\n);\n\n$options = array(\n    'http' => array(\n        'header'  => \"Content-type: application/x-www-form-urlencoded\\r\\n\",\n        'method'  => 'POST',\n        'content' => http_build_query($data)\n    )\n);\n$context  = stream_context_create($options);\n$result = file_get_contents($url, false, $context);\n\nif ($result === FALSE) {\n    echo \"Error sending request.\";\n}\n\nvar_dump($result);\n\n?>\n"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nurl = 'https://www.smsgo.com.tw/sms_gw/queryBulk.aspx'\npayload = {\n    'username': 'your_username',\n    'password': 'your_password',\n    'msgid': '12345,12346',\n    'dstaddr': '0912345678,0987654321'\n}\n\ntry:\n    response = requests.post(url, data=payload)\n    response.raise_for_status()\n    print(response.text)\nexcept requests.exceptions.RequestException as e:\n    print(f\"An error occurred: {e}\")\n"
          },
          {
            "lang": "Java",
            "label": "Java",
            "source": "import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class SmsGoExample {\n    public static void main(String[] args) throws Exception {\n        HttpClient client = HttpClient.newHttpClient();\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://www.smsgo.com.tw/sms_gw/queryBulk.aspx\"))\n                .header(\"Content-Type\", \"application/x-www-form-urlencoded\")\n                .POST(HttpRequest.BodyPublishers.ofString(\"username=your_username&password=your_password&msgid=12345,12346&dstaddr=0912345678,0987654321\"))\n                .build();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}"
          }
        ]
      }
    },
    "/sms_gw/queryPoint.aspx": {
      "get": {
        "tags": [
          "Account"
        ],
        "operationId": "queryPointsGet",
        "deprecated": true,
        "summary": "Query Remaining Points (GET) ⚠ Deprecated",
        "description": "⚠ **Deprecated** — Use POST instead.\n\nRetrieve remaining SMS point balance.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Username"
          },
          {
            "$ref": "#/components/parameters/Password"
          },
          {
            "$ref": "#/components/parameters/Rtype"
          }
        ],
        "responses": {
          "200": {
            "description": "Remaining points. Plain text returns a decimal number (e.g. `6220.0`).",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "examples": {
                  "Success": {
                    "summary": "Success",
                    "value": "6220.0"
                  },
                  "Error": {
                    "summary": "Error",
                    "value": "Error! User name, password, serial number or ip is wrong. Please retry again!"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "statuscode": {
                                "type": "string"
                              },
                              "point": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "results": {
                    "result": [
                      {
                        "statuscode": "0",
                        "point": "6220.0"
                      }
                    ]
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "xml": {
                    "name": "results"
                  },
                  "properties": {
                    "result": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "statuscode": {
                            "type": "string"
                          },
                          "point": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": "<results><result><statuscode>0</statuscode><point>6220.0</point></result></results>"
              }
            }
          }
        },
        "x-internal": true,
        "x-codeSamples": [
          {
            "lang": "cURL",
            "label": "cURL",
            "source": "curl \"https://www.smsgo.com.tw/sms_gw/queryPoint.aspx?username=your_username&password=your_password\""
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "fetch('https://www.smsgo.com.tw/sms_gw/queryPoint.aspx?username=your_username&password=your_password', {\n    method: 'GET'\n})\n.then(response => response.text())\n.then(result => console.log(result))\n.catch(error => console.log('error', error));"
          },
          {
            "lang": "C#",
            "label": "C#",
            "source": "using System;\nusing System.Net.Http;\nusing System.Threading.Tasks;\n\nclass Program\n{\n    static async Task Main(string[] args)\n    {\n        var client = new HttpClient();\n        var request = new HttpRequestMessage(HttpMethod.Get, \"https://www.smsgo.com.tw/sms_gw/queryPoint.aspx?username=your_username&password=your_password\");\n        var response = await client.SendAsync(request);\n        response.EnsureSuccessStatusCode();\n        Console.WriteLine(await response.Content.ReadAsStringAsync());\n    }\n}"
          },
          {
            "lang": "PHP",
            "label": "PHP",
            "source": "<?php\n\n$url = 'https://www.smsgo.com.tw/sms_gw/queryPoint.aspx?username=your_username&password=your_password';\n$result = file_get_contents($url);\n\nif ($result === FALSE) {\n    echo \"Error sending request.\";\n}\n\nvar_dump($result);\n\n?>\n"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nurl = 'https://www.smsgo.com.tw/sms_gw/queryPoint.aspx?username=your_username&password=your_password'\n\ntry:\n    response = requests.get(url)\n    response.raise_for_status()\n    print(response.text)\nexcept requests.exceptions.RequestException as e:\n    print(f\"An error occurred: {e}\")\n"
          },
          {
            "lang": "Java",
            "label": "Java",
            "source": "import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class SmsGoExample {\n    public static void main(String[] args) throws Exception {\n        HttpClient client = HttpClient.newHttpClient();\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://www.smsgo.com.tw/sms_gw/queryPoint.aspx?username=your_username&password=your_password\"))\n                .GET()\n                .build();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}"
          }
        ]
      },
      "post": {
        "tags": [
          "Account"
        ],
        "operationId": "queryPointsPost",
        "summary": "Query Remaining Points (POST)",
        "description": "Retrieve remaining SMS point balance via POST. Accepts `application/x-www-form-urlencoded` or `application/json`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/QueryPointPayload"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryPointPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Remaining points. Plain text: decimal number (e.g. `6220.0`).",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "examples": {
                  "Success": {
                    "summary": "Success",
                    "value": "6220.0"
                  },
                  "Error": {
                    "summary": "Error",
                    "value": "Error! User name, password, serial number or ip is wrong."
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "statuscode": {
                                "type": "string"
                              },
                              "point": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "results": {
                    "result": [
                      {
                        "statuscode": "0",
                        "point": "6220.0"
                      }
                    ]
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "xml": {
                    "name": "results"
                  },
                  "properties": {
                    "result": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "statuscode": {
                            "type": "string"
                          },
                          "point": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": "<results><result><statuscode>0</statuscode><point>6220.0</point></result></results>"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "cURL",
            "label": "cURL",
            "source": "curl -X POST -d 'username=your_username&password=your_password' https://www.smsgo.com.tw/sms_gw/queryPoint.aspx"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "const myHeaders = new Headers();\nmyHeaders.append(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\nconst urlencoded = new URLSearchParams();\nurlencoded.append(\"username\", \"your_username\");\nurlencoded.append(\"password\", \"your_password\");\n\nconst requestOptions = {\n  method: 'POST',\n  headers: myHeaders,\n  body: urlencoded,\n  redirect: 'follow'\n};\n\nfetch(\"https://www.smsgo.com.tw/sms_gw/queryPoint.aspx\", requestOptions)\n  .then(response => response.text())\n  .then(result => console.log(result))\n  .catch(error => console.log('error', error));"
          },
          {
            "lang": "C#",
            "label": "C#",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Net.Http;\nusing System.Threading.Tasks;\n\npublic class SmsGoExample\n{\n    public static async Task Main(string[] args)\n    {\n        var client = new HttpClient();\n        var values = new Dictionary<string, string>\n        {\n            { \"username\", \"your_username\" },\n            { \"password\", \"your_password\" }\n        };\n\n        var content = new FormUrlEncodedContent(values);\n        var response = await client.PostAsync(\"https://www.smsgo.com.tw/sms_gw/queryPoint.aspx\", content);\n        var responseString = await response.Content.ReadAsStringAsync();\n\n        Console.WriteLine(responseString);\n    }\n}\n"
          },
          {
            "lang": "PHP",
            "label": "PHP",
            "source": "<?php\n\n$url = 'https://www.smsgo.com.tw/sms_gw/queryPoint.aspx';\n$data = array(\n    'username' => 'your_username',\n    'password' => 'your_password'\n);\n\n$options = array(\n    'http' => array(\n        'header'  => \"Content-type: application/x-www-form-urlencoded\\r\\n\",\n        'method'  => 'POST',\n        'content' => http_build_query($data)\n    )\n);\n$context  = stream_context_create($options);\n$result = file_get_contents($url, false, $context);\n\nif ($result === FALSE) {\n    echo \"Error sending request.\";\n}\n\nvar_dump($result);\n\n?>\n"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nurl = 'https://www.smsgo.com.tw/sms_gw/queryPoint.aspx'\npayload = {\n    'username': 'your_username',\n    'password': 'your_password'\n}\n\ntry:\n    response = requests.post(url, data=payload)\n    response.raise_for_status()\n    print(response.text)\nexcept requests.exceptions.RequestException as e:\n    print(f\"An error occurred: {e}\")\n"
          },
          {
            "lang": "Java",
            "label": "Java",
            "source": "import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class SmsGoExample {\n    public static void main(String[] args) throws Exception {\n        HttpClient client = HttpClient.newHttpClient();\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://www.smsgo.com.tw/sms_gw/queryPoint.aspx\"))\n                .header(\"Content-Type\", \"application/x-www-form-urlencoded\")\n                .POST(HttpRequest.BodyPublishers.ofString(\"username=your_username&password=your_password\"))\n                .build();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}"
          }
        ]
      }
    },
    "/sms_gw/moWebHook.aspx": {
      "post": {
        "tags": [
          "Account"
        ],
        "operationId": "moWebHookPost",
        "summary": "Set / Get / Clear MO Webhook",
        "description": "Register, retrieve, or remove the global MO (Mobile Originated) Webhook URL for your account.\n\nWhen an end-user replies to an SMS, SMSGO calls this URL via HTTP GET with the following query parameters:\n\n| Parameter | Description |\n|---|---|\n| `srcaddr` | Sender's mobile number |\n| `dstaddr` | Destination (virtual) number |\n| `smbody` | Reply message content (URL-encoded) |\n| `timestamp` | Received time (`yyMMddHHmmss`) |\n| `msgid` | Message identifier |\n\nThis is a global fallback webhook — it fires when no per-send `replyurl` was set for the matched send.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MoWebHookPayload"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MoWebHookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "MO Webhook result. `statuscode=0` means success.\n\n**Error Codes:**\n\n| Code | Description |\n|:---|:---|\n| `0` | Success |\n| `-2` | Username, password, or IP error |\n| `-3` | Username or password empty |\n| `-11` | Database error |\n| `-1` | Invalid URL format |",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "examples": {
                  "Success": {
                    "summary": "Success",
                    "value": "0\nhttps://abc.trycloudflare.com/mo_receive"
                  },
                  "Error": {
                    "summary": "Error",
                    "value": "-3\n"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "statuscode": {
                                "type": "string"
                              },
                              "webhookurl": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Success": {
                    "summary": "Success",
                    "value": {
                      "results": {
                        "result": [
                          {
                            "statuscode": "0",
                            "webhookurl": "https://abc.trycloudflare.com/mo_receive"
                          }
                        ]
                      }
                    }
                  },
                  "Error": {
                    "summary": "Error",
                    "value": {
                      "results": {
                        "result": [
                          {
                            "statuscode": "-3",
                            "webhookurl": ""
                          }
                        ]
                      }
                    }
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "xml": {
                    "name": "results"
                  },
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "statuscode": {
                          "type": "string"
                        },
                        "webhookurl": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Success": {
                    "summary": "Success",
                    "value": "<results><result><statuscode>0</statuscode><webhookurl>https://abc.trycloudflare.com/mo_receive</webhookurl></result></results>"
                  },
                  "Error": {
                    "summary": "Error",
                    "value": "<results><result><statuscode>-3</statuscode><webhookurl></webhookurl></result></results>"
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "cURL",
            "label": "cURL",
            "source": "curl -X POST -d 'username=your_username&password=your_password&action=set&webhookurl=https://abc.trycloudflare.com/mo_receive' https://www.smsgo.com.tw/sms_gw/moWebHook.aspx"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "const urlencoded = new URLSearchParams();\nurlencoded.append('username', 'your_username');\nurlencoded.append('password', 'your_password');\nurlencoded.append('action', 'set');\nurlencoded.append('webhookurl', 'https://abc.trycloudflare.com/mo_receive');\n\nfetch('https://www.smsgo.com.tw/sms_gw/moWebHook.aspx', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\n  body: urlencoded\n})\n.then(r => r.text()).then(console.log);"
          },
          {
            "lang": "C#",
            "label": "C#",
            "source": "var client = new HttpClient();\nvar values = new Dictionary<string, string> {\n    { \"username\", \"your_username\" },\n    { \"password\", \"your_password\" },\n    { \"action\", \"set\" },\n    { \"webhookurl\", \"https://abc.trycloudflare.com/mo_receive\" }\n};\nvar response = await client.PostAsync(\"https://www.smsgo.com.tw/sms_gw/moWebHook.aspx\", new FormUrlEncodedContent(values));\nConsole.WriteLine(await response.Content.ReadAsStringAsync());"
          },
          {
            "lang": "PHP",
            "label": "PHP",
            "source": "<?php\n$url = 'https://www.smsgo.com.tw/sms_gw/moWebHook.aspx';\n$data = ['username'=>'your_username','password'=>'your_password','action'=>'set','webhookurl'=>'https://abc.trycloudflare.com/mo_receive'];\n$context = stream_context_create(['http'=>['method'=>'POST','header'=>'Content-type: application/x-www-form-urlencoded','content'=>http_build_query($data)]]);\necho file_get_contents($url, false, $context);\n?>"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\nresponse = requests.post('https://www.smsgo.com.tw/sms_gw/moWebHook.aspx', data={\n    'username': 'your_username',\n    'password': 'your_password',\n    'action': 'set',\n    'webhookurl': 'https://abc.trycloudflare.com/mo_receive'\n})\nprint(response.text)"
          },
          {
            "lang": "Java",
            "label": "Java",
            "source": "import java.net.URI;\nimport java.net.http.*;\npublic class Example {\n    public static void main(String[] args) throws Exception {\n        HttpClient client = HttpClient.newHttpClient();\n        HttpRequest request = HttpRequest.newBuilder()\n            .uri(URI.create(\"https://www.smsgo.com.tw/sms_gw/moWebHook.aspx\"))\n            .header(\"Content-Type\", \"application/x-www-form-urlencoded\")\n            .POST(HttpRequest.BodyPublishers.ofString(\"username=your_username&password=your_password&action=set&webhookurl=https://abc.trycloudflare.com/mo_receive\"))\n            .build();\n        System.out.println(client.send(request, HttpResponse.BodyHandlers.ofString()).body());\n    }\n}"
          }
        ]
      }
    },
    "/sms_gw/sendsmsCancel.aspx": {
      "get": {
        "tags": [
          "SMS"
        ],
        "operationId": "cancelScheduledSmsGet",
        "deprecated": true,
        "summary": "Cancel Scheduled SMS (GET) ⚠ Deprecated",
        "description": "⚠ **Deprecated** — Use POST instead.\n\nCancel a previously scheduled SMS that has not yet been sent.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Username"
          },
          {
            "$ref": "#/components/parameters/Password"
          },
          {
            "$ref": "#/components/parameters/MsgIdCancel"
          },
          {
            "$ref": "#/components/parameters/Rtype"
          }
        ],
        "responses": {
          "200": {
            "description": "Cancellation result. `0` = success.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "examples": {
                  "Success": {
                    "summary": "Success",
                    "value": "0"
                  },
                  "Error": {
                    "summary": "Error",
                    "value": "-10"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "string"
                },
                "example": "<response><code>0</code><text>Success</text></response>"
              }
            }
          }
        },
        "x-internal": true,
        "x-codeSamples": [
          {
            "lang": "cURL",
            "label": "cURL",
            "source": "curl \"https://www.smsgo.com.tw/sms_gw/sendsmsCancel.aspx?username=your_username&password=your_password&msgid=12345\""
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "fetch('https://www.smsgo.com.tw/sms_gw/sendsmsCancel.aspx?username=your_username&password=your_password&msgid=12345', {\n    method: 'GET'\n})\n.then(response => response.text())\n.then(result => console.log(result))\n.catch(error => console.log('error', error));"
          },
          {
            "lang": "C#",
            "label": "C#",
            "source": "using System;\nusing System.Net.Http;\nusing System.Threading.Tasks;\n\nclass Program\n{\n    static async Task Main(string[] args)\n    {\n        var client = new HttpClient();\n        var request = new HttpRequestMessage(HttpMethod.Get, \"https://www.smsgo.com.tw/sms_gw/sendsmsCancel.aspx?username=your_username&password=your_password&msgid=12345\");\n        var response = await client.SendAsync(request);\n        response.EnsureSuccessStatusCode();\n        Console.WriteLine(await response.Content.ReadAsStringAsync());\n    }\n}"
          },
          {
            "lang": "PHP",
            "label": "PHP",
            "source": "<?php\n\n$url = 'https://www.smsgo.com.tw/sms_gw/sendsmsCancel.aspx?username=your_username&password=your_password&msgid=12345';\n$result = file_get_contents($url);\n\nif ($result === FALSE) {\n    echo \"Error sending request.\";\n}\n\nvar_dump($result);\n\n?>\n"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nurl = 'https://www.smsgo.com.tw/sms_gw/sendsmsCancel.aspx?username=your_username&password=your_password&msgid=12345'\n\ntry:\n    response = requests.get(url)\n    response.raise_for_status()\n    print(response.text)\nexcept requests.exceptions.RequestException as e:\n    print(f\"An error occurred: {e}\")\n"
          },
          {
            "lang": "Java",
            "label": "Java",
            "source": "import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class SmsGoExample {\n    public static void main(String[] args) throws Exception {\n        HttpClient client = HttpClient.newHttpClient();\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://www.smsgo.com.tw/sms_gw/sendsmsCancel.aspx?username=your_username&password=your_password&msgid=12345\"))\n                .GET()\n                .build();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}"
          }
        ]
      },
      "post": {
        "tags": [
          "SMS"
        ],
        "operationId": "cancelScheduledSmsPost",
        "summary": "Cancel Scheduled SMS (POST)",
        "description": "Cancel a previously scheduled SMS that has not yet been sent. Accepts `application/x-www-form-urlencoded` or `application/json`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CancelSmsPayload"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelSmsPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Cancellation result. `0` = success.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": "0"
              },
              "application/xml": {
                "schema": {
                  "type": "string"
                },
                "example": "<response><code>0</code><text>Success</text></response>"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "cURL",
            "label": "cURL",
            "source": "curl -X POST -d 'username=your_username&password=your_password&msgid=12345' https://www.smsgo.com.tw/sms_gw/sendsmsCancel.aspx"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "const myHeaders = new Headers();\nmyHeaders.append(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\nconst urlencoded = new URLSearchParams();\nurlencoded.append(\"username\", \"your_username\");\nurlencoded.append(\"password\", \"your_password\");\nurlencoded.append(\"msgid\", \"12345\");\n\nconst requestOptions = {\n  method: 'POST',\n  headers: myHeaders,\n  body: urlencoded,\n  redirect: 'follow'\n};\n\nfetch(\"https://www.smsgo.com.tw/sms_gw/sendsmsCancel.aspx\", requestOptions)\n  .then(response => response.text())\n  .then(result => console.log(result))\n  .catch(error => console.log('error', error));"
          },
          {
            "lang": "C#",
            "label": "C#",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Net.Http;\nusing System.Threading.Tasks;\n\npublic class SmsGoExample\n{\n    public static async Task Main(string[] args)\n    {\n        var client = new HttpClient();\n        var values = new Dictionary<string, string>\n        {\n            { \"username\", \"your_username\" },\n            { \"password\", \"your_password\" },\n            { \"msgid\", \"12345\" }\n        };\n\n        var content = new FormUrlEncodedContent(values);\n        var response = await client.PostAsync(\"https://www.smsgo.com.tw/sms_gw/sendsmsCancel.aspx\", content);\n        var responseString = await response.Content.ReadAsStringAsync();\n\n        Console.WriteLine(responseString);\n    }\n}\n"
          },
          {
            "lang": "PHP",
            "label": "PHP",
            "source": "<?php\n\n$url = 'https://www.smsgo.com.tw/sms_gw/sendsmsCancel.aspx';\n$data = array(\n    'username' => 'your_username',\n    'password' => 'your_password',\n    'msgid' => '12345'\n);\n\n$options = array(\n    'http' => array(\n        'header'  => \"Content-type: application/x-www-form-urlencoded\\r\\n\",\n        'method'  => 'POST',\n        'content' => http_build_query($data)\n    )\n);\n$context  = stream_context_create($options);\n$result = file_get_contents($url, false, $context);\n\nif ($result === FALSE) {\n    echo \"Error sending request.\";\n}\n\nvar_dump($result);\n\n?>\n"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nurl = 'https://www.smsgo.com.tw/sms_gw/sendsmsCancel.aspx'\npayload = {\n    'username': 'your_username',\n    'password': 'your_password',\n    'msgid': '12345'\n}\n\ntry:\n    response = requests.post(url, data=payload)\n    response.raise_for_status()\n    print(response.text)\nexcept requests.exceptions.RequestException as e:\n    print(f\"An error occurred: {e}\")\n"
          },
          {
            "lang": "Java",
            "label": "Java",
            "source": "import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class SmsGoExample {\n    public static void main(String[] args) throws Exception {\n        HttpClient client = HttpClient.newHttpClient();\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://www.smsgo.com.tw/sms_gw/sendsmsCancel.aspx\"))\n                .header(\"Content-Type\", \"application/x-www-form-urlencoded\")\n                .POST(HttpRequest.BodyPublishers.ofString(\"username=your_username&password=your_password&msgid=12345\"))\n                .build();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}"
          }
        ]
      }
    },
    "/sms_gw/verify.aspx": {
      "get": {
        "tags": [
          "Verification"
        ],
        "operationId": "sendVerificationCodeGet",
        "deprecated": true,
        "summary": "Send OTP Code (GET) ⚠ Deprecated",
        "description": "⚠ **Deprecated** — Use POST instead.\n\nSend a one-time password (OTP) to a mobile number.\n\n**OTP Flow Step 1/2:** Call this → save `msgid` from response → proceed to `/verifyAck.aspx`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Username"
          },
          {
            "$ref": "#/components/parameters/Password"
          },
          {
            "$ref": "#/components/parameters/DstAddr"
          },
          {
            "$ref": "#/components/parameters/CodeLength"
          },
          {
            "$ref": "#/components/parameters/Domain"
          },
          {
            "$ref": "#/components/parameters/DlvTime"
          },
          {
            "$ref": "#/components/parameters/ResponseCallback"
          },
          {
            "$ref": "#/components/parameters/Rtype"
          }
        ],
        "responses": {
          "200": {
            "description": "API response. Format determined by `rtype` parameter. `statuscode=0` means success.\n\n**Error Codes:**\n\n| Code | Description |\n|:---|:---|\n| `0` | Success |\n| `-1` | CGI string error |\n| `-2` | Username, password, or IP error |\n| `-3` | Username or password empty |\n| `-5` | Phone number format error |\n| `-8` | Insufficient points |\n| `-9` | Too many recipients (max 50) |\n| `-10` | Send failed |\n| `-11` | Database error |\n| `-12` | Message body empty |\n| `-13` | Parameter count mismatch |\n| `-14` | Fraud keyword detected |\n| `-15` | IP address not allowed |\n| `-16` | API service not enabled |\n| `-17` | Callback URL not allowed |\n| `-18` | Off-net number |\n| `-19` | Number blocked |\n| `-20` | Marked as SPAM |\n| `-21` | Capacity reached |\n| `-22` | Request rerouted |\n| `-23` | No signature |\n| `-24` | OTP verification failed |\n| `-25` | OTP expired |\n| `-30` | Operator system ID error |",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "examples": {
                  "Success": {
                    "summary": "OTP sent successfully",
                    "value": "msgid=2601270523943266\nstatuscode=0\nstatusstr=Verify success\npoint=1"
                  },
                  "Error": {
                    "summary": "Authentication error",
                    "value": "msgid=-3\nstatuscode=-3\nstatusstr=username or password empty!\npoint=0"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "msgid": {
                          "type": "string"
                        },
                        "statuscode": {
                          "type": "string"
                        },
                        "statusstr": {
                          "type": "string"
                        },
                        "point": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Success": {
                    "summary": "OTP sent successfully",
                    "value": {
                      "result": {
                        "msgid": "2601270523943266",
                        "statuscode": "0",
                        "statusstr": "Verify success",
                        "point": 1
                      }
                    }
                  },
                  "Error": {
                    "summary": "Authentication error",
                    "value": {
                      "result": {
                        "msgid": "-3",
                        "statuscode": "-3",
                        "statusstr": "username or password empty!",
                        "point": 0
                      }
                    }
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "xml": {
                    "name": "response"
                  },
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "msgid": {
                      "type": "string"
                    },
                    "text": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Success": {
                    "summary": "OTP sent successfully",
                    "value": "<response><code>0</code><msgid>2601270523943266</msgid><text>Verify success</text></response>"
                  },
                  "Error": {
                    "summary": "Authentication error",
                    "value": "<response><code>-3</code><msgid>-3</msgid><text>username or password empty!</text></response>"
                  }
                }
              }
            }
          }
        },
        "x-internal": true,
        "x-codeSamples": [
          {
            "lang": "cURL",
            "label": "cURL",
            "source": "curl \"https://www.smsgo.com.tw/sms_gw/verify.aspx?username=your_username&password=your_password&dstaddr=0912345678&codelength=4&domain=example.com&rtype=JSON\""
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "fetch('https://www.smsgo.com.tw/sms_gw/verify.aspx?username=your_username&password=your_password&dstaddr=0912345678&codelength=4&domain=example.com&rtype=JSON', {\n    method: 'GET'\n})\n.then(response => response.text())\n.then(result => console.log(result))\n.catch(error => console.log('error', error));"
          },
          {
            "lang": "C#",
            "label": "C#",
            "source": "using System;\nusing System.Net.Http;\nusing System.Threading.Tasks;\n\nclass Program\n{\n    static async Task Main(string[] args)\n    {\n        var client = new HttpClient();\n        var request = new HttpRequestMessage(HttpMethod.Get, \"https://www.smsgo.com.tw/sms_gw/verify.aspx?username=your_username&password=your_password&dstaddr=0912345678&codelength=4&domain=example.com&rtype=JSON\");\n        var response = await client.SendAsync(request);\n        response.EnsureSuccessStatusCode();\n        Console.WriteLine(await response.Content.ReadAsStringAsync());\n    }\n}"
          },
          {
            "lang": "PHP",
            "label": "PHP",
            "source": "<?php\n\n$url = 'https://www.smsgo.com.tw/sms_gw/verify.aspx?username=your_username&password=your_password&dstaddr=0912345678&codelength=4&domain=example.com&rtype=JSON';\n$result = file_get_contents($url);\n\nif ($result === FALSE) {\n    echo \"Error sending request.\";\n}\n\nvar_dump($result);\n\n?>\n"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nurl = 'https://www.smsgo.com.tw/sms_gw/verify.aspx?username=your_username&password=your_password&dstaddr=0912345678&codelength=4&domain=example.com&rtype=JSON'\n\ntry:\n    response = requests.get(url)\n    response.raise_for_status()\n    print(response.text)\nexcept requests.exceptions.RequestException as e:\n    print(f\"An error occurred: {e}\")\n"
          },
          {
            "lang": "Java",
            "label": "Java",
            "source": "import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class SmsGoExample {\n    public static void main(String[] args) throws Exception {\n        HttpClient client = HttpClient.newHttpClient();\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://www.smsgo.com.tw/sms_gw/verify.aspx?username=your_username&password=your_password&dstaddr=0912345678&codelength=4&domain=example.com&rtype=JSON\"))\n                .GET()\n                .build();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}"
          }
        ]
      },
      "post": {
        "tags": [
          "Verification"
        ],
        "operationId": "sendVerificationCodePost",
        "summary": "Send OTP Code (POST)",
        "description": "Send a one-time password (OTP) to a mobile number. Accepts `application/x-www-form-urlencoded` or `application/json`.\n\n**OTP Flow Step 1/2:** Call this → save `msgid` from response → user enters code → call `/verifyAck.aspx` with `serial_number=msgid`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SendVerifyPayload"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendVerifyPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "API response. Format determined by `rtype` parameter. `statuscode=0` means success.\n\n**Error Codes:**\n\n| Code | Description |\n|:---|:---|\n| `0` | Success |\n| `-1` | CGI string error |\n| `-2` | Username, password, or IP error |\n| `-3` | Username or password empty |\n| `-5` | Phone number format error |\n| `-8` | Insufficient points |\n| `-9` | Too many recipients (max 50) |\n| `-10` | Send failed |\n| `-11` | Database error |\n| `-12` | Message body empty |\n| `-13` | Parameter count mismatch |\n| `-14` | Fraud keyword detected |\n| `-15` | IP address not allowed |\n| `-16` | API service not enabled |\n| `-17` | Callback URL not allowed |\n| `-18` | Off-net number |\n| `-19` | Number blocked |\n| `-20` | Marked as SPAM |\n| `-21` | Capacity reached |\n| `-22` | Request rerouted |\n| `-23` | No signature |\n| `-24` | OTP verification failed |\n| `-25` | OTP expired |\n| `-30` | Operator system ID error |",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "examples": {
                  "Success": {
                    "summary": "OTP sent successfully",
                    "value": "msgid=2601270523943266\nstatuscode=0\nstatusstr=Verify success\npoint=1"
                  },
                  "Error": {
                    "summary": "Authentication error",
                    "value": "msgid=-3\nstatuscode=-3\nstatusstr=username or password empty!\npoint=0"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "msgid": {
                          "type": "string"
                        },
                        "statuscode": {
                          "type": "string"
                        },
                        "statusstr": {
                          "type": "string"
                        },
                        "point": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Success": {
                    "summary": "OTP sent successfully",
                    "value": {
                      "result": {
                        "msgid": "2601270523943266",
                        "statuscode": "0",
                        "statusstr": "Verify success",
                        "point": 1
                      }
                    }
                  },
                  "Error": {
                    "summary": "Authentication error",
                    "value": {
                      "result": {
                        "msgid": "-3",
                        "statuscode": "-3",
                        "statusstr": "username or password empty!",
                        "point": 0
                      }
                    }
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "xml": {
                    "name": "response"
                  },
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "msgid": {
                      "type": "string"
                    },
                    "text": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Success": {
                    "summary": "OTP sent successfully",
                    "value": "<response><code>0</code><msgid>2601270523943266</msgid><text>Verify success</text></response>"
                  },
                  "Error": {
                    "summary": "Authentication error",
                    "value": "<response><code>-3</code><msgid>-3</msgid><text>username or password empty!</text></response>"
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "cURL",
            "label": "cURL",
            "source": "curl -X POST -d 'username=your_username&password=your_password&dstaddr=0912345678&codelength=4&domain=example.com&rtype=JSON' https://www.smsgo.com.tw/sms_gw/verify.aspx"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "const myHeaders = new Headers();\nmyHeaders.append(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\nconst urlencoded = new URLSearchParams();\nurlencoded.append(\"username\", \"your_username\");\nurlencoded.append(\"password\", \"your_password\");\nurlencoded.append(\"dstaddr\", \"0912345678\");\nurlencoded.append(\"codelength\", \"4\");\nurlencoded.append(\"domain\", \"example.com\");\nurlencoded.append(\"rtype\", \"JSON\");\n\nconst requestOptions = {\n  method: 'POST',\n  headers: myHeaders,\n  body: urlencoded,\n  redirect: 'follow'\n};\n\nfetch(\"https://www.smsgo.com.tw/sms_gw/verify.aspx\", requestOptions)\n  .then(response => response.text())\n  .then(result => console.log(result))\n  .catch(error => console.log('error', error));"
          },
          {
            "lang": "C#",
            "label": "C#",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Net.Http;\nusing System.Threading.Tasks;\n\npublic class SmsGoExample\n{\n    public static async Task Main(string[] args)\n    {\n        var client = new HttpClient();\n        var values = new Dictionary<string, string>\n        {\n            { \"username\", \"your_username\" },\n            { \"password\", \"your_password\" },\n            { \"dstaddr\", \"0912345678\" },\n            { \"codelength\", \"4\" },\n            { \"domain\", \"example.com\" },\n            { \"rtype\", \"JSON\" }\n        };\n\n        var content = new FormUrlEncodedContent(values);\n        var response = await client.PostAsync(\"https://www.smsgo.com.tw/sms_gw/verify.aspx\", content);\n        var responseString = await response.Content.ReadAsStringAsync();\n\n        Console.WriteLine(responseString);\n    }\n}\n"
          },
          {
            "lang": "PHP",
            "label": "PHP",
            "source": "<?php\n\n$url = 'https://www.smsgo.com.tw/sms_gw/verify.aspx';\n$data = array(\n    'username' => 'your_username',\n    'password' => 'your_password',\n    'dstaddr' => '0912345678',\n    'codelength' => '4',\n    'domain' => 'example.com',\n    'rtype' => 'JSON'\n);\n\n$options = array(\n    'http' => array(\n        'header'  => \"Content-type: application/x-www-form-urlencoded\\r\\n\",\n        'method'  => 'POST',\n        'content' => http_build_query($data)\n    )\n);\n$context  = stream_context_create($options);\n$result = file_get_contents($url, false, $context);\n\nif ($result === FALSE) {\n    echo \"Error sending request.\";\n}\n\nvar_dump($result);\n\n?>\n"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nurl = 'https://www.smsgo.com.tw/sms_gw/verify.aspx'\npayload = {\n    'username': 'your_username',\n    'password': 'your_password',\n    'dstaddr': '0912345678',\n    'codelength': '4',\n    'domain': 'example.com',\n    'rtype': 'JSON'\n}\n\ntry:\n    response = requests.post(url, data=payload)\n    response.raise_for_status()\n    print(response.text)\nexcept requests.exceptions.RequestException as e:\n    print(f\"An error occurred: {e}\")\n"
          },
          {
            "lang": "Java",
            "label": "Java",
            "source": "import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class SmsGoExample {\n    public static void main(String[] args) throws Exception {\n        HttpClient client = HttpClient.newHttpClient();\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://www.smsgo.com.tw/sms_gw/verify.aspx\"))\n                .header(\"Content-Type\", \"application/x-www-form-urlencoded\")\n                .POST(HttpRequest.BodyPublishers.ofString(\"username=your_username&password=your_password&dstaddr=0912345678&codelength=4&domain=example.com&rtype=JSON\"))\n                .build();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}"
          }
        ]
      }
    },
    "/sms_gw/verifyAck.aspx": {
      "get": {
        "tags": [
          "Verification"
        ],
        "operationId": "acknowledgeVerificationCodeGet",
        "deprecated": true,
        "summary": "Verify OTP Code (GET) ⚠ Deprecated",
        "description": "⚠ **Deprecated** — Use POST instead.\n\n**OTP Flow Step 2/2:** Validate the code entered by the user.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Username"
          },
          {
            "$ref": "#/components/parameters/Password"
          },
          {
            "$ref": "#/components/parameters/DstAddr"
          },
          {
            "$ref": "#/components/parameters/OtpCode"
          },
          {
            "$ref": "#/components/parameters/SerialNumber"
          },
          {
            "$ref": "#/components/parameters/Resend"
          },
          {
            "$ref": "#/components/parameters/DlvTime"
          },
          {
            "$ref": "#/components/parameters/ResponseCallback"
          },
          {
            "$ref": "#/components/parameters/Rtype"
          }
        ],
        "responses": {
          "200": {
            "description": "API response. Format determined by `rtype` parameter. `statuscode=0` means success.\n\n**Error Codes:**\n\n| Code | Description |\n|:---|:---|\n| `0` | Success |\n| `-1` | CGI string error |\n| `-2` | Username, password, or IP error |\n| `-3` | Username or password empty |\n| `-5` | Phone number format error |\n| `-8` | Insufficient points |\n| `-9` | Too many recipients (max 50) |\n| `-10` | Send failed |\n| `-11` | Database error |\n| `-12` | Message body empty |\n| `-13` | Parameter count mismatch |\n| `-14` | Fraud keyword detected |\n| `-15` | IP address not allowed |\n| `-16` | API service not enabled |\n| `-17` | Callback URL not allowed |\n| `-18` | Off-net number |\n| `-19` | Number blocked |\n| `-20` | Marked as SPAM |\n| `-21` | Capacity reached |\n| `-22` | Request rerouted |\n| `-23` | No signature |\n| `-24` | OTP verification failed |\n| `-25` | OTP expired |\n| `-30` | Operator system ID error |",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "examples": {
                  "Success": {
                    "summary": "OTP verified successfully",
                    "value": "msgid=2603160424021870\nstatuscode=0\nstatusstr=OK\npoint=0"
                  },
                  "VerifyFail": {
                    "summary": "Wrong OTP code (-24)",
                    "value": "msgid=-24\nstatuscode=-24\nstatusstr=Verify Fail\npoint=0"
                  },
                  "VerifyExpired": {
                    "summary": "OTP expired (-25)",
                    "value": "msgid=-25\nstatuscode=-25\nstatusstr=Verify Expired\npoint=0"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "msgid": {
                          "type": "string"
                        },
                        "statuscode": {
                          "type": "string"
                        },
                        "statusstr": {
                          "type": "string"
                        },
                        "point": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Success": {
                    "summary": "OTP verified successfully",
                    "value": {
                      "result": {
                        "msgid": "2603160424021870",
                        "statuscode": "0",
                        "statusstr": "OK",
                        "point": 0
                      }
                    }
                  },
                  "VerifyFail": {
                    "summary": "Wrong OTP code (-24)",
                    "value": {
                      "result": {
                        "msgid": "-24",
                        "statuscode": "-24",
                        "statusstr": "Verify Fail",
                        "point": 0
                      }
                    }
                  },
                  "VerifyExpired": {
                    "summary": "OTP expired (-25)",
                    "value": {
                      "result": {
                        "msgid": "-25",
                        "statuscode": "-25",
                        "statusstr": "Verify Expired",
                        "point": 0
                      }
                    }
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "xml": {
                    "name": "response"
                  },
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "msgid": {
                      "type": "string"
                    },
                    "text": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Success": {
                    "summary": "OTP verified successfully",
                    "value": "<response><code>0</code><msgid>2603160424021870</msgid><text>OK</text></response>"
                  },
                  "VerifyFail": {
                    "summary": "Wrong OTP code (-24)",
                    "value": "<response><code>-24</code><msgid>-24</msgid><text>Verify Fail</text></response>"
                  },
                  "VerifyExpired": {
                    "summary": "OTP expired (-25)",
                    "value": "<response><code>-25</code><msgid>-25</msgid><text>Verify Expired</text></response>"
                  }
                }
              }
            }
          }
        },
        "x-internal": true,
        "x-codeSamples": [
          {
            "lang": "cURL",
            "label": "cURL",
            "source": "curl \"https://www.smsgo.com.tw/sms_gw/verifyAck.aspx?username=your_username&password=your_password&dstaddr=0912345678&OtpCode=123456&serial_number=1234567890\""
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "fetch('https://www.smsgo.com.tw/sms_gw/verifyAck.aspx?username=your_username&password=your_password&dstaddr=0912345678&OtpCode=123456&serial_number=1234567890', {\n    method: 'GET'\n})\n.then(response => response.text())\n.then(result => console.log(result))\n.catch(error => console.log('error', error));"
          },
          {
            "lang": "C#",
            "label": "C#",
            "source": "using System;\nusing System.Net.Http;\nusing System.Threading.Tasks;\n\nclass Program\n{\n    static async Task Main(string[] args)\n    {\n        var client = new HttpClient();\n        var request = new HttpRequestMessage(HttpMethod.Get, \"https://www.smsgo.com.tw/sms_gw/verifyAck.aspx?username=your_username&password=your_password&dstaddr=0912345678&OtpCode=123456&serial_number=1234567890\");\n        var response = await client.SendAsync(request);\n        response.EnsureSuccessStatusCode();\n        Console.WriteLine(await response.Content.ReadAsStringAsync());\n    }\n}"
          },
          {
            "lang": "PHP",
            "label": "PHP",
            "source": "<?php\n\n$url = 'https://www.smsgo.com.tw/sms_gw/verifyAck.aspx?username=your_username&password=your_password&dstaddr=0912345678&OtpCode=123456&serial_number=1234567890';\n$result = file_get_contents($url);\n\nif ($result === FALSE) {\n    echo \"Error sending request.\";\n}\n\nvar_dump($result);\n\n?>\n"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nurl = 'https://www.smsgo.com.tw/sms_gw/verifyAck.aspx?username=your_username&password=your_password&dstaddr=0912345678&OtpCode=123456&serial_number=1234567890'\n\ntry:\n    response = requests.get(url)\n    response.raise_for_status()\n    print(response.text)\nexcept requests.exceptions.RequestException as e:\n    print(f\"An error occurred: {e}\")\n"
          },
          {
            "lang": "Java",
            "label": "Java",
            "source": "import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class SmsGoExample {\n    public static void main(String[] args) throws Exception {\n        HttpClient client = HttpClient.newHttpClient();\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://www.smsgo.com.tw/sms_gw/verifyAck.aspx?username=your_username&password=your_password&dstaddr=0912345678&OtpCode=123456&serial_number=1234567890\"))\n                .GET()\n                .build();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}"
          }
        ]
      },
      "post": {
        "tags": [
          "Verification"
        ],
        "operationId": "acknowledgeVerificationCodePost",
        "summary": "Verify OTP Code (POST)",
        "description": "**OTP Flow Step 2/2:** Validate the OTP code entered by the user. Accepts `application/x-www-form-urlencoded` or `application/json`.\n\n- `serial_number` = `msgid` from the Send OTP response\n- `OtpCode` = 4 or 6 digit code the user received\n- statuscode `-24` = wrong code, `-25` = expired (set `resend=true` to auto-resend)",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/AckVerifyPayload"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AckVerifyPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "API response. Format determined by `rtype` parameter. `statuscode=0` means success.\n\n**Error Codes:**\n\n| Code | Description |\n|:---|:---|\n| `0` | Success |\n| `-1` | CGI string error |\n| `-2` | Username, password, or IP error |\n| `-3` | Username or password empty |\n| `-5` | Phone number format error |\n| `-8` | Insufficient points |\n| `-9` | Too many recipients (max 50) |\n| `-10` | Send failed |\n| `-11` | Database error |\n| `-12` | Message body empty |\n| `-13` | Parameter count mismatch |\n| `-14` | Fraud keyword detected |\n| `-15` | IP address not allowed |\n| `-16` | API service not enabled |\n| `-17` | Callback URL not allowed |\n| `-18` | Off-net number |\n| `-19` | Number blocked |\n| `-20` | Marked as SPAM |\n| `-21` | Capacity reached |\n| `-22` | Request rerouted |\n| `-23` | No signature |\n| `-24` | OTP verification failed |\n| `-25` | OTP expired |\n| `-30` | Operator system ID error |",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "examples": {
                  "Success": {
                    "summary": "OTP verified successfully",
                    "value": "msgid=2603160424021870\nstatuscode=0\nstatusstr=OK\npoint=0"
                  },
                  "VerifyFail": {
                    "summary": "Wrong OTP code (-24)",
                    "value": "msgid=-24\nstatuscode=-24\nstatusstr=Verify Fail\npoint=0"
                  },
                  "VerifyExpired": {
                    "summary": "OTP expired (-25)",
                    "value": "msgid=-25\nstatuscode=-25\nstatusstr=Verify Expired\npoint=0"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "msgid": {
                          "type": "string"
                        },
                        "statuscode": {
                          "type": "string"
                        },
                        "statusstr": {
                          "type": "string"
                        },
                        "point": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Success": {
                    "summary": "OTP verified successfully",
                    "value": {
                      "result": {
                        "msgid": "2603160424021870",
                        "statuscode": "0",
                        "statusstr": "OK",
                        "point": 0
                      }
                    }
                  },
                  "VerifyFail": {
                    "summary": "Wrong OTP code (-24)",
                    "value": {
                      "result": {
                        "msgid": "-24",
                        "statuscode": "-24",
                        "statusstr": "Verify Fail",
                        "point": 0
                      }
                    }
                  },
                  "VerifyExpired": {
                    "summary": "OTP expired (-25)",
                    "value": {
                      "result": {
                        "msgid": "-25",
                        "statuscode": "-25",
                        "statusstr": "Verify Expired",
                        "point": 0
                      }
                    }
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "xml": {
                    "name": "response"
                  },
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "msgid": {
                      "type": "string"
                    },
                    "text": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Success": {
                    "summary": "OTP verified successfully",
                    "value": "<response><code>0</code><msgid>2603160424021870</msgid><text>OK</text></response>"
                  },
                  "VerifyFail": {
                    "summary": "Wrong OTP code (-24)",
                    "value": "<response><code>-24</code><msgid>-24</msgid><text>Verify Fail</text></response>"
                  },
                  "VerifyExpired": {
                    "summary": "OTP expired (-25)",
                    "value": "<response><code>-25</code><msgid>-25</msgid><text>Verify Expired</text></response>"
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "cURL",
            "label": "cURL",
            "source": "curl -X POST -d 'username=your_username&password=your_password&dstaddr=0912345678&OtpCode=123456&serial_number=1234567890' https://www.smsgo.com.tw/sms_gw/verifyAck.aspx"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "const myHeaders = new Headers();\nmyHeaders.append(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\nconst urlencoded = new URLSearchParams();\nurlencoded.append(\"username\", \"your_username\");\nurlencoded.append(\"password\", \"your_password\");\nurlencoded.append(\"dstaddr\", \"0912345678\");\nurlencoded.append(\"OtpCode\", \"123456\");\nurlencoded.append(\"serial_number\", \"1234567890\");\n\nconst requestOptions = {\n  method: 'POST',\n  headers: myHeaders,\n  body: urlencoded,\n  redirect: 'follow'\n};\n\nfetch(\"https://www.smsgo.com.tw/sms_gw/verifyAck.aspx\", requestOptions)\n  .then(response => response.text())\n  .then(result => console.log(result))\n  .catch(error => console.log('error', error));"
          },
          {
            "lang": "C#",
            "label": "C#",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Net.Http;\nusing System.Threading.Tasks;\n\npublic class SmsGoExample\n{\n    public static async Task Main(string[] args)\n    {\n        var client = new HttpClient();\n        var values = new Dictionary<string, string>\n        {\n            { \"username\", \"your_username\" },\n            { \"password\", \"your_password\" },\n            { \"dstaddr\", \"0912345678\" },\n            { \"OtpCode\", \"123456\" },\n            { \"serial_number\", \"1234567890\" }\n        };\n\n        var content = new FormUrlEncodedContent(values);\n        var response = await client.PostAsync(\"https://www.smsgo.com.tw/sms_gw/verifyAck.aspx\", content);\n        var responseString = await response.Content.ReadAsStringAsync();\n\n        Console.WriteLine(responseString);\n    }\n}\n"
          },
          {
            "lang": "PHP",
            "label": "PHP",
            "source": "<?php\n\n$url = 'https://www.smsgo.com.tw/sms_gw/verifyAck.aspx';\n$data = array(\n    'username' => 'your_username',\n    'password' => 'your_password',\n    'dstaddr' => '0912345678',\n    'OtpCode' => '123456',\n    'serial_number' => '1234567890'\n);\n\n$options = array(\n    'http' => array(\n        'header'  => \"Content-type: application/x-www-form-urlencoded\\r\\n\",\n        'method'  => 'POST',\n        'content' => http_build_query($data)\n    )\n);\n$context  = stream_context_create($options);\n$result = file_get_contents($url, false, $context);\n\nif ($result === FALSE) {\n    echo \"Error sending request.\";\n}\n\nvar_dump($result);\n\n?>\n"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nurl = 'https://www.smsgo.com.tw/sms_gw/verifyAck.aspx'\npayload = {\n    'username': 'your_username',\n    'password': 'your_password',\n    'dstaddr': '0912345678',\n    'OtpCode': '123456',\n    'serial_number': '1234567890'\n}\n\ntry:\n    response = requests.post(url, data=payload)\n    response.raise_for_status()\n    print(response.text)\nexcept requests.exceptions.RequestException as e:\n    print(f\"An error occurred: {e}\")\n"
          },
          {
            "lang": "Java",
            "label": "Java",
            "source": "import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class SmsGoExample {\n    public static void main(String[] args) throws Exception {\n        HttpClient client = HttpClient.newHttpClient();\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://www.smsgo.com.tw/sms_gw/verifyAck.aspx\"))\n                .header(\"Content-Type\", \"application/x-www-form-urlencoded\")\n                .POST(HttpRequest.BodyPublishers.ofString(\"username=your_username&password=your_password&dstaddr=0912345678&OtpCode=123456&serial_number=1234567890\"))\n                .build();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}"
          }
        ]
      }
    },
    "/sms_gw/sendsmscustom.aspx": {
      "post": {
        "tags": [
          "SMS"
        ],
        "operationId": "sendSmsCustom",
        "summary": "Send Personalized Bulk SMS",
        "description": "Send a batch of SMS messages where each recipient receives a unique message body.\n\nAccepts three input modes (auto-detected from `Content-Type`):\n\n| Mode | Content-Type | How to pass data |\n|---|---|---|\n| JSON array | `application/json` | `messages` array of `{dstaddr, smbody}` objects |\n| JSON CSV | `application/json` | `csv` string field |\n| Form CSV | `application/x-www-form-urlencoded` | `csv` string field |\n| File upload | `multipart/form-data` | `csv` file field (UTF-8 or BIG5/CP950) |\n\n**CSV format:** one `mobile,message` per line. Only the first comma splits the columns, so commas in the message are safe. Lines starting with `#` are ignored.\n\n> ⚠️ This endpoint is intended for internal/MCP use and does not require IP whitelisting.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendSmsCustomPayload"
              },
              "examples": {
                "JsonArray": {
                  "summary": "JSON array of messages",
                  "value": {
                    "username": "your_username",
                    "password": "your_password",
                    "encoding": "BIG5",
                    "messages": [
                      {
                        "dstaddr": "0912345678",
                        "smbody": "親愛的王小明，您的訂單已出貨"
                      },
                      {
                        "dstaddr": "0987654321",
                        "smbody": "Dear Jane, your order has shipped"
                      }
                    ]
                  }
                },
                "JsonCsv": {
                  "summary": "JSON with CSV string",
                  "value": {
                    "username": "your_username",
                    "password": "your_password",
                    "csv": "0912345678,親愛的王小明，您的訂單已出貨\n0987654321,Dear Jane, your order has shipped"
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SendSmsCustomPayload"
              }
            },
            "multipart/form-data": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AuthFields"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "csv": {
                        "type": "string",
                        "format": "binary",
                        "description": "CSV file upload (UTF-8 or BIG5/CP950 encoding auto-detected)"
                      },
                      "encoding": {
                        "type": "string",
                        "default": "BIG5",
                        "enum": [
                          "BIG5",
                          "ASCII",
                          "UCS2",
                          "LBIG5",
                          "LASCII",
                          "LUCS2"
                        ]
                      },
                      "dlvtime": {
                        "type": "string"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Batch send result. `statuscode=0` means all sent. `statuscode=1` means partial. `statuscode=-10` means all failed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statuscode": {
                      "type": "string",
                      "description": "0=all OK, 1=partial, -10=all failed, negative=error"
                    },
                    "statusstr": {
                      "type": "string"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "sent": {
                      "type": "integer"
                    },
                    "failed": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "seq": {
                            "type": "integer"
                          },
                          "dstaddr": {
                            "type": "string"
                          },
                          "statuscode": {
                            "type": "string"
                          },
                          "statusstr": {
                            "type": "string"
                          },
                          "msgid": {
                            "type": "string"
                          },
                          "point": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "AllSuccess": {
                    "summary": "All sent",
                    "value": {
                      "statuscode": "0",
                      "statusstr": "OK",
                      "total": 2,
                      "sent": 2,
                      "failed": 0,
                      "results": [
                        {
                          "seq": 1,
                          "dstaddr": "0912345678",
                          "statuscode": "0",
                          "statusstr": "OK",
                          "msgid": "S20260528120000001",
                          "point": 998
                        },
                        {
                          "seq": 2,
                          "dstaddr": "0987654321",
                          "statuscode": "0",
                          "statusstr": "OK",
                          "msgid": "S20260528120000002",
                          "point": 997
                        }
                      ]
                    }
                  },
                  "Partial": {
                    "summary": "Partial success",
                    "value": {
                      "statuscode": "1",
                      "statusstr": "partial",
                      "total": 2,
                      "sent": 1,
                      "failed": 1,
                      "results": [
                        {
                          "seq": 1,
                          "dstaddr": "0912345678",
                          "statuscode": "0",
                          "statusstr": "OK",
                          "msgid": "S20260528120000001",
                          "point": 998
                        },
                        {
                          "seq": 2,
                          "dstaddr": "invalid",
                          "statuscode": "-5",
                          "statusstr": "Phone number format error",
                          "msgid": "",
                          "point": 998
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-internal": true,
        "x-hidden": true,
        "x-codeSamples": [
          {
            "lang": "cURL",
            "label": "cURL (JSON array)",
            "source": "curl -X POST https://www.smsgo.com.tw/sms_gw/sendsmscustom.aspx \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"username\":\"your_username\",\"password\":\"your_password\",\"messages\":[{\"dstaddr\":\"0912345678\",\"smbody\":\"Hello Alice\"},{\"dstaddr\":\"0987654321\",\"smbody\":\"Hello Bob\"}]}'"
          },
          {
            "lang": "cURL",
            "label": "cURL (file upload)",
            "source": "curl -X POST https://www.smsgo.com.tw/sms_gw/sendsmscustom.aspx \\\n  -F 'username=your_username' \\\n  -F 'password=your_password' \\\n  -F 'csv=@/path/to/messages.csv'"
          },
          {
            "lang": "Python",
            "label": "Python (JSON)",
            "source": "import requests\n\nurl = 'https://www.smsgo.com.tw/sms_gw/sendsmscustom.aspx'\npayload = {\n    'username': 'your_username',\n    'password': 'your_password',\n    'messages': [\n        {'dstaddr': '0912345678', 'smbody': 'Hello Alice'},\n        {'dstaddr': '0987654321', 'smbody': 'Hello Bob'}\n    ]\n}\nresponse = requests.post(url, json=payload)\nprint(response.json())\n"
          },
          {
            "lang": "Python",
            "label": "Python (file upload)",
            "source": "import requests\n\nurl = 'https://www.smsgo.com.tw/sms_gw/sendsmscustom.aspx'\nwith open('messages.csv', 'rb') as f:\n    response = requests.post(url, data={\n        'username': 'your_username',\n        'password': 'your_password'\n    }, files={'csv': f})\nprint(response.json())\n"
          }
        ]
      }
    },
    "/sms_gw/queryReply.aspx": {
      "post": {
        "tags": [
          "Query"
        ],
        "operationId": "queryRepliesPost",
        "summary": "Query SMS Replies (POST)",
        "description": "Retrieve inbound reply messages sent by recipients within a date range. Accepts `application/x-www-form-urlencoded` or `application/json`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/QueryReplyPayload"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryReplyPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "List of reply messages.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "examples": {
                  "Success": {
                    "summary": "Success",
                    "value": "0912345678|0800123456|2026/06/01 10:05:00|2026/06/01 09:00:00|Reply message\r\n"
                  },
                  "Error": {
                    "summary": "Error",
                    "value": "-2|-2|Error! Username, password or IP is wrong. Please retry again!"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "srcaddr": {
                                "type": "string",
                                "description": "Replier's phone number"
                              },
                              "dstaddr": {
                                "type": "string",
                                "description": "User's registered mobile"
                              },
                              "recvtime": {
                                "type": "string",
                                "description": "Time the reply was received"
                              },
                              "sendtime": {
                                "type": "string",
                                "description": "Time the original SMS was sent"
                              },
                              "smbody": {
                                "type": "string",
                                "description": "Reply message content"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "results": {
                    "result": [
                      {
                        "srcaddr": "0912345678",
                        "dstaddr": "0800123456",
                        "recvtime": "2026/06/01 10:05:00",
                        "sendtime": "2026/06/01 09:00:00",
                        "smbody": "Reply message"
                      }
                    ]
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "xml": {
                    "name": "results"
                  },
                  "properties": {
                    "result": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "srcaddr": {
                            "type": "string"
                          },
                          "dstaddr": {
                            "type": "string"
                          },
                          "recvtime": {
                            "type": "string"
                          },
                          "sendtime": {
                            "type": "string"
                          },
                          "smbody": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": "<results><result><srcaddr>0912345678</srcaddr><dstaddr>0800123456</dstaddr><recvtime>2026/06/01 10:05:00</recvtime><sendtime>2026/06/01 09:00:00</sendtime><smbody>Reply message</smbody></result></results>"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "cURL",
            "label": "cURL",
            "source": "curl -X POST -d 'username=your_username&password=your_password&startdate=2026/06/01&enddate=2026/06/30&rtype=JSON' https://www.smsgo.com.tw/sms_gw/queryReply.aspx"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "const params = new URLSearchParams();\nparams.append('username', 'your_username');\nparams.append('password', 'your_password');\nparams.append('startdate', '2026/06/01');\nparams.append('enddate', '2026/06/30');\nparams.append('rtype', 'JSON');\n\nfetch('https://www.smsgo.com.tw/sms_gw/queryReply.aspx', {\n  method: 'POST',\n  body: params\n})\n.then(r => r.json())\n.then(console.log)\n.catch(console.error);"
          },
          {
            "lang": "C#",
            "label": "C#",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Net.Http;\nusing System.Threading.Tasks;\n\npublic class SmsGoExample\n{\n    public static async Task Main(string[] args)\n    {\n        var client = new HttpClient();\n        var values = new Dictionary<string, string>\n        {\n            { \"username\", \"your_username\" },\n            { \"password\", \"your_password\" },\n            { \"startdate\", \"2026/06/01\" },\n            { \"enddate\", \"2026/06/30\" },\n            { \"rtype\", \"JSON\" }\n        };\n        var content = new FormUrlEncodedContent(values);\n        var response = await client.PostAsync(\"https://www.smsgo.com.tw/sms_gw/queryReply.aspx\", content);\n        Console.WriteLine(await response.Content.ReadAsStringAsync());\n    }\n}"
          },
          {
            "lang": "PHP",
            "label": "PHP",
            "source": "<?php\n$url = 'https://www.smsgo.com.tw/sms_gw/queryReply.aspx';\n$data = ['username'=>'your_username','password'=>'your_password','startdate'=>'2026/06/01','enddate'=>'2026/06/30','rtype'=>'JSON'];\n$options = ['http'=>['header'=>\"Content-type: application/x-www-form-urlencoded\\r\\n\",'method'=>'POST','content'=>http_build_query($data)]];\n$result = file_get_contents($url, false, stream_context_create($options));\nvar_dump($result);\n?>"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nurl = 'https://www.smsgo.com.tw/sms_gw/queryReply.aspx'\npayload = {\n    'username': 'your_username',\n    'password': 'your_password',\n    'startdate': '2026/06/01',\n    'enddate': '2026/06/30',\n    'rtype': 'JSON'\n}\nresponse = requests.post(url, data=payload)\nprint(response.json())"
          },
          {
            "lang": "Java",
            "label": "Java",
            "source": "import java.net.URI;\nimport java.net.http.*;\n\npublic class SmsGoExample {\n    public static void main(String[] args) throws Exception {\n        HttpClient client = HttpClient.newHttpClient();\n        HttpRequest request = HttpRequest.newBuilder()\n            .uri(URI.create(\"https://www.smsgo.com.tw/sms_gw/queryReply.aspx\"))\n            .header(\"Content-Type\", \"application/x-www-form-urlencoded\")\n            .POST(HttpRequest.BodyPublishers.ofString(\"username=your_username&password=your_password&startdate=2026/06/01&enddate=2026/06/30&rtype=JSON\"))\n            .build();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}"
          }
        ]
      }
    },
    "/sms_gw/querySentList.aspx": {
      "post": {
        "tags": [
          "Query"
        ],
        "operationId": "querySentListPost",
        "summary": "Query Sent Message List (POST)",
        "description": "Retrieve a paginated list of sent messages within a date range (max 31 days). Accepts `application/x-www-form-urlencoded` or `application/json`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/QuerySentListPayload"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuerySentListPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Paginated list of sent messages.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "examples": {
                  "Success": {
                    "summary": "Success",
                    "value": "page=1|pagesize=50|totalcount=1|totalpages=1\r\nS202606010900001|0912345678|2026/06/01 09:00:00|Hello!|0|DELIVRD\r\n"
                  },
                  "Error": {
                    "summary": "Error",
                    "value": "-2|-2|Error! Username, password or IP is wrong. Please retry again!"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer"
                        },
                        "pagesize": {
                          "type": "integer"
                        },
                        "totalcount": {
                          "type": "integer"
                        },
                        "totalpages": {
                          "type": "integer"
                        },
                        "result": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "msgid": {
                                "type": "string",
                                "description": "Batch serial number"
                              },
                              "dstaddr": {
                                "type": "string",
                                "description": "Recipient phone number"
                              },
                              "sendtime": {
                                "type": "string",
                                "description": "Time the SMS was sent"
                              },
                              "smbody": {
                                "type": "string",
                                "description": "Message content"
                              },
                              "statuscode": {
                                "type": "string",
                                "description": "Delivery status code: 0=DELIVRD, -10=UNDELIV, -18=ABSENT, -19=REJECTD, -20=SPAM, 1=SCHEDULED, 2=CANCELLED"
                              },
                              "statusstr": {
                                "type": "string",
                                "description": "Delivery status: DELIVRD, UNDELIV, ABSENT, REJECTD, SPAM, SCHEDULED, CANCELLED"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "results": {
                    "page": 1,
                    "pagesize": 50,
                    "totalcount": 1,
                    "totalpages": 1,
                    "result": [
                      {
                        "msgid": "S202606010900001",
                        "dstaddr": "0912345678",
                        "sendtime": "2026/06/01 09:00:00",
                        "smbody": "Hello from SMSGO!",
                        "statuscode": "0",
                        "statusstr": "DELIVRD"
                      }
                    ]
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "xml": {
                    "name": "results"
                  },
                  "properties": {
                    "page": {
                      "type": "integer"
                    },
                    "pagesize": {
                      "type": "integer"
                    },
                    "totalcount": {
                      "type": "integer"
                    },
                    "totalpages": {
                      "type": "integer"
                    },
                    "result": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "msgid": {
                            "type": "string"
                          },
                          "dstaddr": {
                            "type": "string"
                          },
                          "sendtime": {
                            "type": "string"
                          },
                          "smbody": {
                            "type": "string"
                          },
                          "statuscode": {
                            "type": "string"
                          },
                          "statusstr": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": "<results><page>1</page><pagesize>50</pagesize><totalcount>1</totalcount><totalpages>1</totalpages><result><msgid>S202606010900001</msgid><dstaddr>0912345678</dstaddr><sendtime>2026/06/01 09:00:00</sendtime><smbody>Hello from SMSGO!</smbody><statuscode>0</statuscode><statusstr>DELIVRD</statusstr></result></results>"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "cURL",
            "label": "cURL",
            "source": "curl -X POST -d 'username=your_username&password=your_password&startdate=2026/06/01&enddate=2026/06/30&page=1&pagesize=50&rtype=JSON' https://www.smsgo.com.tw/sms_gw/querySentList.aspx"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "const params = new URLSearchParams();\nparams.append('username', 'your_username');\nparams.append('password', 'your_password');\nparams.append('startdate', '2026/06/01');\nparams.append('enddate', '2026/06/30');\nparams.append('page', '1');\nparams.append('pagesize', '50');\nparams.append('rtype', 'JSON');\n\nfetch('https://www.smsgo.com.tw/sms_gw/querySentList.aspx', {\n  method: 'POST',\n  body: params\n})\n.then(r => r.json())\n.then(console.log)\n.catch(console.error);"
          },
          {
            "lang": "C#",
            "label": "C#",
            "source": "using System;\nusing System.Collections.Generic;\nusing System.Net.Http;\nusing System.Threading.Tasks;\n\npublic class SmsGoExample\n{\n    public static async Task Main(string[] args)\n    {\n        var client = new HttpClient();\n        var values = new Dictionary<string, string>\n        {\n            { \"username\", \"your_username\" },\n            { \"password\", \"your_password\" },\n            { \"startdate\", \"2026/06/01\" },\n            { \"enddate\", \"2026/06/30\" },\n            { \"page\", \"1\" },\n            { \"pagesize\", \"50\" },\n            { \"rtype\", \"JSON\" }\n        };\n        var content = new FormUrlEncodedContent(values);\n        var response = await client.PostAsync(\"https://www.smsgo.com.tw/sms_gw/querySentList.aspx\", content);\n        Console.WriteLine(await response.Content.ReadAsStringAsync());\n    }\n}"
          },
          {
            "lang": "PHP",
            "label": "PHP",
            "source": "<?php\n$url = 'https://www.smsgo.com.tw/sms_gw/querySentList.aspx';\n$data = ['username'=>'your_username','password'=>'your_password','startdate'=>'2026/06/01','enddate'=>'2026/06/30','page'=>1,'pagesize'=>50,'rtype'=>'JSON'];\n$options = ['http'=>['header'=>\"Content-type: application/x-www-form-urlencoded\\r\\n\",'method'=>'POST','content'=>http_build_query($data)]];\n$result = file_get_contents($url, false, stream_context_create($options));\nvar_dump($result);\n?>"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nurl = 'https://www.smsgo.com.tw/sms_gw/querySentList.aspx'\npayload = {\n    'username': 'your_username',\n    'password': 'your_password',\n    'startdate': '2026/06/01',\n    'enddate': '2026/06/30',\n    'page': 1,\n    'pagesize': 50,\n    'rtype': 'JSON'\n}\nresponse = requests.post(url, data=payload)\nprint(response.json())"
          },
          {
            "lang": "Java",
            "label": "Java",
            "source": "import java.net.URI;\nimport java.net.http.*;\n\npublic class SmsGoExample {\n    public static void main(String[] args) throws Exception {\n        HttpClient client = HttpClient.newHttpClient();\n        HttpRequest request = HttpRequest.newBuilder()\n            .uri(URI.create(\"https://www.smsgo.com.tw/sms_gw/querySentList.aspx\"))\n            .header(\"Content-Type\", \"application/x-www-form-urlencoded\")\n            .POST(HttpRequest.BodyPublishers.ofString(\"username=your_username&password=your_password&startdate=2026/06/01&enddate=2026/06/30&page=1&pagesize=50&rtype=JSON\"))\n            .build();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}"
          }
        ]
      }
    }
  }
}