Appearance
Websockets API Documentation
Overview
The Websockets API provides real-time event streaming capabilities for task and application events.
Endpoint
wss://ws.journeyid.com
Establishes a WebSocket connection for receiving real-time events.
Connection Protocol
After connection, client must send a CONNECT message with a valid WebSocket token:
CONNECT <ws_token>Event Types
task.sentSend an SMS to the customertask_bootstrappedCustomer opened the link in their browsertask.startedCustomer began the tasktask.succeededCustomer completed the tasktask.failedCustomer failed to complete the tasktask.timed_outCustomer didn't complete the task in time
Custom Application Events
webauthn.timeout_or_cancelled(Passkeys app)biometrics.consent(Passkeys app)
Event Format
typescript
{
id: string
type: string
timestamp: string
error?: string
payload?: {
id: string
app: string
timestamp: string
status?: string
event?: string
request: {
id: string
}
session: {
ref: string
}
customer: {
ref: string
}
delivery: {
method: string
phoneNumber?: string
}
// App-specific metadata
// task.succeeded
"e-form"?: {
form: {
id: string
title: string
}
data?: Record<string, any>
}
}
}Error Event Format
typescript
{
id: string
type: string
timestamp: string
error: string
}