④POST/partner/v1/tenants
| | | |
| name | string | ✅ | |
| phone | string | ✅ | |
| plan | string | ✅ | |
| notes | string | — | |
curl -X POST "https://wtsaibot.com/partner/v1/tenants" \
-H "X-Partner-Key: <PARTNER_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"name": "示範茶餐廳",
"phone": "85291234567",
"plan": "pro499",
"notes": "港式茶餐廳,午市套餐外賣為主"
}'
201
{
"tenantId": "yourbrand_a1b2c3",
"webhookToken": "1234567890",
"webhookUrl": "https://wtsaibot.com/webhook/1234567890",
"portalUrl": "https://wtsaibot.com/merchant"
}
| |
| tenantId | |
| webhookUrl | |
| portalUrl | |
⑤GET/partner/v1/tenants
curl "https://wtsaibot.com/partner/v1/tenants" \
-H "X-Partner-Key: <PARTNER_API_KEY>"
200
{
"partner": "yourbrand",
"tenants": [
{
"tenantId": "yourbrand_a1b2c3",
"name": "示範茶餐廳",
"status": "trial",
"planTier": "pro499",
"createdAt": 1747267200000
}
]
}
⑥GET/partner/v1/usage?month=YYYY-MM
curl "https://wtsaibot.com/partner/v1/usage?month=2026-09" \
-H "X-Partner-Key: <PARTNER_API_KEY>"
200
{
"partner": "yourbrand",
"month": "2026-09",
"tenants": [
{
"tenantId": "yourbrand_a1b2c3",
"name": "示範茶餐廳",
"conversations": 42,
"messages": 318
}
],
"totals": { "conversations": 42, "messages": 318 }
}