Speko Docs

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

MethodDescription
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

FieldTypeDescription
idstringCallback id.
source_session_idstring | nullCall that requested the callback.
created_session_idstring | nullOutbound call session created when dispatched.
agent_idstring | nullAgent to run.
phone_number_idstring | nullCaller ID phone-number row.
to_numberstringDestination number.
from_numberstring | nullCaller ID.
scheduled_atstringISO timestamp.
status'scheduled' | 'dispatching' | 'dispatched' | 'cancelled' | 'failed'Callback state.
pipeline_configRecord<string, unknown>Resolved call pipeline.
metadataRecord<string, unknown>Free-form metadata and analysis context.

On this page