aptly.openCardPane({ cardId: string }) // in a board: board side panel; elsewhere: fullscreen modal
aptly.openCardView({ cardId: string }) // always a fullscreen modal
aptly.startDialer({ number: string, name?: string }) // number: E.164 recommended, not validated
aptly.openEmailComposer({ to?: string|string[]|{value:string,label:string}[], subject?: string, content?: string /* HTML */, composeMode?: 'email'|'sms', aptletInstanceId?: string, applicationId?: string })
aptly.openSMSComposer({ to?: string|string[]|{value:string,label:string}[] /* phone numbers */, subject?: string /* window title only */, content?: string /* plain text, max 1600 */, composeMode?: 'sms'|'email', aptletInstanceId?: string, applicationId?: string })
aptly.createEvent({ recipients?: { value: string /* email */, label: string /* name */ }[], date?: ISO-8601 /* accepted, currently not applied */, comments?: string /* accepted, currently not applied */ })
aptly.createCard({ boardId: string /* board UUID */, fields?: { name?: string, [fieldUuid: string]: any } /* board pages only; ignored on the dashboard */ })
aptly.createTask({ title?: string, dueAt?: ISO-8601, priority?: 'asap'|'high'|'medium'|'low' /* default 'low' */, activityLogType?: 'todo'|'email'|'sms'|'voice' /* default 'todo' */, note?: string, assigneeId?: string /* default: current user */, aptletInstanceId?: string, aptletUuid?: string })
aptly.createContact({ firstname?: string, lastname?: string, phone?: string|{type:string,number:string}[], email?: string, company?: string, title?: string })
aptly.navigateToContact({ contactId: string })
aptly.openConversation({ streamId: string /* non-empty, required */, title?: string })
aptly.openTask({ taskId: string /* non-empty, required; task detail with email, SMS and call actions */ })
Composer `to`: one string, an array of strings, or an array of { value, label }. Email addresses in
email mode, phone numbers in sms mode. openSMSComposer defaults composeMode to 'sms'; openEmailComposer to 'email'.
createCard outside a board or the dashboard does nothing (still resolves success: true).
Email draft text must be passed as content, with subject for the subject line; displaying it in chat does not prefill the composer. Hiro replaces a blank contact-email button when it requests a populated draft, including after a resumed run.
createEvent recipients must be { value, label }, not { email, name }.
Full field detail, per-action behavior and caveats: /embed-actions
All return Promise<{ success: boolean, error?: string }>. success: true means dispatched, not completed.
An action only fires if its ID is in the embed's allowedActions (aptly.actions);
otherwise it resolves { success: false, error: 'Not permitted' }.
Other errors: 'timeout' (no reply in 3s), 'not-in-iframe'. openConversation without a string streamId, or openTask without a string taskId, resolves success: false.