API 參考
渠道方GET

列出渠道區域

回傳渠道已經開通嘅區域清單。supported 表示渠道係咪喺呢個區域可用;allocatable 表示目前係咪可以喺呢個區域綁定新帳號。

https://api.unifyport.ai/v1/providers/{provider}/regions

請求標頭

X-Api-Key
string必填

工作區 API Key,工作區會由呢個標頭解析得出嚟。

路徑參數

provider
string必填

用嚟識別嗰條 providers 路由嘅 ID。

請求內容

呢個介面唔需要 JSON 請求內容。

回應

200
200 OK

請求成功,回應內容嘅例子如上。

400
請求錯誤

請求內容、路徑或者參數無效。

401
未授權

X-Api-Key 請求標頭缺少或者無效。

409
衝突

目前操作同現有嘅渠道帳號或者資源衝突。

500
伺服器錯誤

服務遇到咗未預期嘅錯誤。

請求

curl -X GET https://api.unifyport.ai/v1/providers/{provider}/regions \
  -H "X-Api-Key: <YOUR_API_KEY>"

回應

{
  "data": {
    "provider": "telegram",
    "regions": [
      {
        "region": "global",
        "supported": true,
        "allocatable": true
      }
    ]
  }
}