VYSLO DEVELOPER PLATFORM
Back to vyslo.ai

WEBHOOKS

Webhooks

You do not poll for new recordings. When one finishes processing, we POST a signed event to the URL you registered, and you pull the text with the capability token. The main event is recording.ready; card and processing events are listed under All events.

不需要輪詢新錄音。一條錄音處理完成後,我們會向你登記的地址 POST 一個帶簽名的事件,你再用能力令牌去取正文。 最主要的事件是 recording.ready;卡片與處理事件見全部事件。

recording.ready

POST your-webhook-url · application/json
{
  "event": "recording.ready",
  "recordingId": "rec_01J9…",
  "title": "Thursday standup",
  "userId": "7f3c…",
  "ownerVerified": true,
  "svVerdict": "owner",
  "timestamp": 1761801600
}
FieldMeaning
eventThe event name; see all events. Branch on it.
recordingIdPass to GET /open/ext/recordings/{id}. Also your idempotency key.
titleThe generated title, or an empty string.
userIdWhich of your authorizing users this belongs to. Match it to your own records.
ownerVerifiedtrue when the cloud voiceprint review returned owner.
svVerdictThe raw verdict string, or an empty string if there was none.
timestampUnix seconds at dispatch.
欄位含義
event事件名,見全部事件。請按它分支。
recordingId傳給 GET /open/ext/recordings/{id},同時也是你的幂等鍵。
title生成的標題,或空字串。
userId這條錄音屬於你哪一位授權用戶。與你自己的記錄對應。
ownerVerified雲端聲紋複核判為 owner 時為 true。
svVerdict原始判決字串;沒有則為空字串。
timestamp投遞時刻的 Unix 秒。
THE EVENT CARRIES NO TRANSCRIPT

There is no transcript text or summary in the payload, by design — the body travels to whatever URL you configured, so it stays metadata. Fetch the content over the API with the capability token, which re-checks the grant on every call.

事件裡沒有正文

載荷裡刻意不含轉寫正文與摘要——這個請求體會發往你配置的任意地址,所以只放元數據。 正文請用能力令牌經 API 取回,那條路徑每次調用都會重新校驗授權。

When it fires

All of these have to hold. Any one of them failing means no delivery, silently:

以下條件必須同時成立。任一不成立即不投遞,且不報錯:

Verify the signature

X-Vyslo-Signature is the lowercase hex HMAC-SHA256 of the raw request body keyed with your app's webhookSecret. Verify before you parse, and compare in constant time. Re-serializing the JSON first will not produce the same digest.

X-Vyslo-Signature 是用應用的 webhookSecret 對原始請求體 做 HMAC-SHA256 後的小寫 hex。先校驗再解析,並用恆定時間比較。先把 JSON 重新序列化會算出不同的摘要。

python · flask
import hmac, hashlib, os
from flask import Flask, request, abort

app = Flask(__name__)
SECRET = os.environ["VYSLO_WEBHOOK_SECRET"].encode()

@app.post("/hooks/vyslo")
def vyslo_hook():
    raw = request.get_data()                      # bytes, exactly as received
    expected = hmac.new(SECRET, raw, hashlib.sha256).hexdigest()
    if not hmac.compare_digest(expected, request.headers.get("X-Vyslo-Signature", "")):
        abort(401)

    event = request.get_json()
    enqueue(event["recordingId"])                 # idempotent by recordingId
    return "", 204                               # ack first, work after
kotlin · reference implementation in the SDK
val ok = VysloOpen.verifyWebhookSignature(
    webhookSecret = secret,
    rawBody = body,
    signature = header("X-Vyslo-Signature"),
)

Delivery and retries

BehaviourValue
Attempts3 — the first, then two retries
Backoff2s before the second attempt, 8s before the third
Timeouts5s to connect, 10s per attempt
SuccessAny 2xx. The body is discarded
RetriedAny non-2xx, a timeout or a connection error
After three failuresThe delivery is marked failed and recorded for audit. It is not retried later
OrderingNot guaranteed. Two recordings finishing together may arrive in either order
行為取值
投遞次數3 次——首次加兩次重試
退避第二次前等 2 秒,第三次前等 8 秒
超時連接 5 秒,單次請求 10 秒
成功任何 2xx。回應體被丟棄
重試條件非 2xx、超時或連接錯誤
三次都失敗標記為失敗並落審計記錄,之後不再補投
順序不保證。同時完成的兩條錄音可能以任意順序到達

What your endpoint should do

All events

EventWhenScope
recording.readyTranscript and summary are readyrecordings.read
transcript.readyThe transcript is ready, before the summaryevents.subscribe
summary.readyThe summary is readyevents.subscribe
recording.startedA recording started: button, app or smart wakeevents.subscribe
recording.stoppedA recording stopped, with its originevents.subscribe
smartwake.triggeredSmart wake heard the owner and started recordingevents.subscribe
listening.startedSmart wake started listeningevents.subscribe
listening.endedSmart wake stopped listeningevents.subscribe
button.pressedA press on the card buttonevents.subscribe
charging.changedThe card started or stopped chargingevents.subscribe
事件何時權限
recording.ready轉寫與摘要已就緒recordings.read
transcript.ready轉寫已就緒,摘要尚在生成events.subscribe
summary.ready摘要已就緒events.subscribe
recording.started錄音開始:按鍵、App 或智能喚醒發起events.subscribe
recording.stopped錄音停止,附停止原因events.subscribe
smartwake.triggered智能喚醒聽到機主並開始錄音events.subscribe
listening.started智能喚醒開始監聽events.subscribe
listening.ended智能喚醒結束監聽events.subscribe
button.pressed卡片按鍵被按下events.subscribe
charging.changed卡片開始或停止充電events.subscribe

Every event uses the same envelope, signature and retry schedule as recording.ready, with deviceId added for card events. No payload carries transcript text. Card events reach the cloud through the phone the card is connected to; over BLE your app receives them directly.

所有事件與 recording.ready 使用同樣的信封、簽名與重試節奏,卡片事件另帶 deviceId。 任何載荷都不含轉寫正文。卡片事件經卡片所連的手機送到雲端;經 BLE 時,你的 App 直接收到。