运行时POST
启动运行时
启动该账号的运行时实例。这是运行时控制,不涉及认证。
https://api.unifyport.ai/v1/accounts/{account_id}/runtime/start请求头
X-Api-Keystring必填
工作区 API Key,工作区由该请求头解析得到。
Content-Typestring必填
发送 JSON 请求体时使用 application/json。
路径参数
account_idstring必填
用于该 runtime 路由的标识符。
请求体
该接口接收空 JSON 对象;请按请求示例发送 {}。
响应体
account_idstring
该响应所对应的渠道账号。
providerstring
处理该运行时动作的渠道。
enum: telegram, whatsapp, line, twitter, zalo, tiktok, whatsapp_protocol
actionstring
本次请求的运行时动作。
enum: refresh_status, start, stop, reconnect
operation_statusstring
运行时动作被接受或完成的状态。
runtime_statusstring
标准化的运行时状态,取值之一:unknown、starting、running、stopping、stopped、reconnecting、disconnected 或 error。
enum: unknown, starting, running, stopping, stopped, reconnecting, disconnected, error
runtime_errorstring
动作未完成时的渠道运行时错误。
响应
200200 OK
请求成功,响应体示例如上。
400请求错误
请求体、路径或参数不合法。
401未授权
X-Api-Key 请求头缺失或无效。
409冲突
当前操作与已有的渠道账号或资源冲突。
500服务端错误
服务端遇到了未预期的错误。
502上游网关错误
渠道适配器或上游渠道未能完成该操作。
请求
curl -X POST https://api.unifyport.ai/v1/accounts/{account_id}/runtime/start \
-H "X-Api-Key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{}'响应
{
"data": {
"runtime_status": "starting"
}
}