API リファレンス
ランタイムPOST

Runtime 状態を更新

アカウントの最新のプロバイダランタイム状態を同期します。runtime_status はプラットフォーム標準の値 unknown / starting / running / stopping / stopped / reconnecting / disconnected / error のいずれかを取ります。プロバイダ固有のラベルはこのセットに正規化されてから返されます。

https://api.unifyport.ai/v1/accounts/{account_id}/runtime/refresh

ヘッダー

X-Api-Key
string必須

ワークスペース API キー。このヘッダーからワークスペースを特定します。

Content-Type
string必須

JSON のリクエストボディを送る場合は application/json を使用します。

パスパラメータ

account_id
string必須

runtime ルートで使用される識別子。

リクエストボディ

このエンドポイントは空の JSON オブジェクトを受け取ります。リクエスト例どおり {} を送信してください。

レスポンスボディ

account_id
string

このレスポンスが対象とするプロバイダアカウント。

provider
string

ランタイム操作を処理したプロバイダ。

enum: telegram, whatsapp, line, twitter, zalo, tiktok, whatsapp_protocol

action
string

要求されたランタイム操作。

enum: refresh_status, start, stop, reconnect

operation_status
string

ランタイム操作が受理または完了したかを示す状態。

runtime_status
string

正規化されたランタイム状態。unknown、starting、running、stopping、stopped、reconnecting、disconnected、error のいずれか。

enum: unknown, starting, running, stopping, stopped, reconnecting, disconnected, error

runtime_error
string

操作を完了できなかった場合のプロバイダランタイムエラー。

レスポンス

200
200 OK

リクエスト成功。レスポンスボディの例を参照してください。

400
Bad Request

リクエストボディ、パス、またはパラメータが不正です。

401
Unauthorized

X-Api-Key ヘッダが欠落しているか無効です。

409
Conflict

要求された操作が、既存のプロバイダアカウントまたはリソースと競合しています。

500
Internal Server Error

サービスで予期しないエラーが発生しました。

502
Bad Gateway

プロバイダアダプタまたは上流サービスが操作を完了できませんでした。

リクエスト

curl -X POST https://api.unifyport.ai/v1/accounts/{account_id}/runtime/refresh \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{}'

レスポンス

{
  "data": {
    "account_id": "acc_example",
    "runtime_status": "running"
  }
}