callbacks
Scheduled callback resources created from call analysis.
speko.callbacks lists and controls scheduled callbacks. Callbacks are usually created by post-call analysis when the caller requested a follow-up.
const { callbacks } = await speko.callbacks.list({ status: 'scheduled' });
await speko.callbacks.dispatch(callbacks[0]!.id);Methods
| Method | Description |
|---|---|
list(params?) | List scheduled callbacks. Filter by status, sourceSessionId, and limit. |
get(callbackId) | Fetch one callback. |
cancel(callbackId, params?) | Cancel a callback with an optional reason. |
dispatch(callbackId) | Dispatch a callback immediately. |
ScheduledCallback
| Field | Type | Description |
|---|---|---|
id | string | Callback id. |
source_session_id | string | null | Call that requested the callback. |
created_session_id | string | null | Outbound call session created when dispatched. |
agent_id | string | null | Agent to run. |
phone_number_id | string | null | Caller ID phone-number row. |
to_number | string | Destination number. |
from_number | string | null | Caller ID. |
scheduled_at | string | ISO timestamp. |
status | 'scheduled' | 'dispatching' | 'dispatched' | 'cancelled' | 'failed' | Callback state. |
pipeline_config | Record<string, unknown> | Resolved call pipeline. |
metadata | Record<string, unknown> | Free-form metadata and analysis context. |