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.sent
Send an SMS to the customertask_bootstrapped
Customer opened the link in their browsertask.started
Customer began the tasktask.succeeded
Customer completed the tasktask.failed
Customer failed to complete the tasktask.timed_out
Customer 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
}