Return types
Named data models used by client method results.
These are TypeScript data shapes, not class instances. Follow a type from a method to inspect its fields. unknown marks a provider-controlled value that needs narrowing; it does not promise an undocumented shape.
ChatId
Opaque conversation identifier. Use the exact value returned by a message event or chat lookup.
Type declaration
type ChatId = stringChat
Serialized chat returned by chat lookups and listings. Its id is an opaque ChatId; additional WhatsApp Web fields may be present.
Type declaration
type Chat = { id: ChatId; name?: string; formattedTitle?: string; isGroup: boolean; contact: Contact | null; groupMetadata?: GroupMetadata | null; presence?: Record<string, unknown> | null; t?: number; unreadCount?: number; lastReceivedKey?: unknown; msgs?: unknown[] | null; isReadOnly?: boolean; muteExpiration?: number; notSpam?: boolean; pin?: number; ack?: unknown }Related types: ChatId, Contact, GroupMetadata
| Field | Type | Required |
|---|---|---|
id | ChatId — ChatId | Yes |
name | string | No |
formattedTitle | string | No |
isGroup | boolean | Yes |
contact | Contact | null — Contact | Yes |
groupMetadata | GroupMetadata | null — GroupMetadata | No |
presence | Record<string, unknown> | null | No |
t | number | No |
unreadCount | number | No |
lastReceivedKey | unknown | No |
msgs | unknown[] | null | No |
isReadOnly | boolean | No |
muteExpiration | number | No |
notSpam | boolean | No |
pin | number | No |
ack | unknown | No |
Additional provider fields may be present; narrow them before use.
ContactId
Opaque WhatsApp contact identifier. Preserve the exact value returned by the API.
Type declaration
type ContactId = stringContact
Type declaration
type Contact = { id: ContactId; name?: string; shortName?: string; pushname?: string; formattedName?: string; isBusiness?: boolean; isEnterprise?: boolean; isMe?: boolean; isMyContact?: boolean; isPSA?: boolean; isUser?: boolean; isWAContact?: boolean; labels?: string[]; msgs?: unknown[] | null; profilePicThumbObj?: { eurl?: string; id?: Id; img?: string; imgFull?: string; tag?: string }; statusMute?: boolean; type?: string; verifiedLevel?: number; verifiedName?: string; isOnline?: boolean; lastSeen?: number }| Field | Type | Required |
|---|---|---|
id | ContactId — ContactId | Yes |
name | string | No |
shortName | string | No |
pushname | string | No |
formattedName | string | No |
isBusiness | boolean | No |
isEnterprise | boolean | No |
isMe | boolean | No |
isMyContact | boolean | No |
isPSA | boolean | No |
isUser | boolean | No |
isWAContact | boolean | No |
labels | string[] | No |
msgs | unknown[] | null | No |
profilePicThumbObj | { eurl?: string; id?: Id; img?: string; imgFull?: string; tag?: string } — Id | No |
statusMute | boolean | No |
type | string | No |
verifiedLevel | number | No |
verifiedName | string | No |
isOnline | boolean | No |
lastSeen | number | No |
Additional provider fields may be present; narrow them before use.
DataURL
Type declaration
type DataURL = `data:${string};base64,${string}`GroupChatId
Opaque group conversation identifier returned by a group lookup or join method.
Type declaration
type GroupChatId = stringGroupId
Identifier for a WhatsApp group. Use the value returned by the API.
Type declaration
type GroupId = stringGroupMetadata
Serialized group metadata returned by group lookups. Additional WhatsApp Web fields may be present.
Type declaration
type GroupMetadata = { id: GroupId; subject: string; creation: number; owner?: ContactId; desc?: string; descTime?: number; descOwner?: ContactId; restrict?: boolean; announce?: boolean; participants: { id: ContactId; isAdmin: boolean; isSuperAdmin?: boolean }[] }Related types: ContactId, GroupId
| Field | Type | Required |
|---|---|---|
id | GroupId — GroupId | Yes |
subject | string | Yes |
creation | number | Yes |
owner | ContactId — ContactId | No |
desc | string | No |
descTime | number | No |
descOwner | ContactId — ContactId | No |
restrict | boolean | No |
announce | boolean | No |
participants | { id: ContactId; isAdmin: boolean; isSuperAdmin?: boolean }[] — ContactId | Yes |
Additional provider fields may be present; narrow them before use.
Id
Type declaration
type Id = { server: string; user: string; _serialized: string }| Field | Type | Required |
|---|---|---|
server | string | Yes |
user | string | Yes |
_serialized | string | Yes |
Additional provider fields may be present; narrow them before use.
Location
Type declaration
type Location = { lat: number; lng: number; name?: string; address?: string; url?: string }| Field | Type | Required |
|---|---|---|
lat | number | Yes |
lng | number | Yes |
name | string | No |
address | string | No |
url | string | No |
Additional provider fields may be present; narrow them before use.
MessageIdReturn
A message ID as a string or an object containing the serialized ID. Validate it before passing it to another method.
Type declaration
type MessageIdReturn = MessageId | SerializedMessageIdRelated types: MessageId, SerializedMessageId
MessageId
Message identifier returned by a send method or message event.
Type declaration
type MessageId = stringMessage
Type declaration
type Message = { id: MessageId; body: string; type: "chat" | "audio" | "ptt" | "image" | "video" | "document" | "sticker" | "location" | "vcard" | "multi_vcard" | "revoked" | "order" | "buttons_response" | "list_response" | "unknown"; t: number; notifyName?: string; from: ChatId; to: ChatId; self: "in" | "out"; ack: "ACK_PENDING" | "ACK_SERVER" | "ACK_DEVICE" | "ACK_READ" | "ACK_PLAYED" | -1 | "ACK_ERROR" | 0 | 1 | 2 | 3 | 4; invis?: boolean; isNewMsg?: boolean; star?: boolean; recvFresh?: boolean; broadcast?: boolean; isForwarded?: boolean; labels?: string[]; mentionedJidList?: ContactId[]; caption?: string; sender: Contact; timestamp: number; content: string; isGroupMsg: boolean; isMMS?: boolean; isMedia: boolean; isNotification: boolean; isPSA?: boolean; fromMe: boolean; chat: Chat; chatId: ChatId; author?: string; clientUrl?: string; deprecatedMms3Url?: string; isQuotedMsgAvailable: boolean; quotedMsg?: unknown; quotedMsgObj?: unknown; senderId?: string }Related types: ChatId, Chat, ContactId, Contact, MessageId
| Field | Type | Required |
|---|---|---|
id | MessageId — MessageId | Yes |
body | string | Yes |
type | "chat" | "audio" | "ptt" | "image" | "video" | "document" | "sticker" | "location" | "vcard" | "multi_vcard" | "revoked" | "order" | "buttons_response" | "list_response" | "unknown" | Yes |
t | number | Yes |
notifyName | string | No |
from | ChatId — ChatId | Yes |
to | ChatId — ChatId | Yes |
self | "in" | "out" | Yes |
ack | "ACK_PENDING" | "ACK_SERVER" | "ACK_DEVICE" | "ACK_READ" | "ACK_PLAYED" | -1 | "ACK_ERROR" | 0 | 1 | 2 | 3 | 4 | Yes |
invis | boolean | No |
isNewMsg | boolean | No |
star | boolean | No |
recvFresh | boolean | No |
broadcast | boolean | No |
isForwarded | boolean | No |
labels | string[] | No |
mentionedJidList | ContactId[] — ContactId | No |
caption | string | No |
sender | Contact — Contact | Yes |
timestamp | number | Yes |
content | string | Yes |
isGroupMsg | boolean | Yes |
isMMS | boolean | No |
isMedia | boolean | Yes |
isNotification | boolean | Yes |
isPSA | boolean | No |
fromMe | boolean | Yes |
chat | Chat — Chat | Yes |
chatId | ChatId — ChatId | Yes |
author | string | No |
clientUrl | string | No |
deprecatedMms3Url | string | No |
isQuotedMsgAvailable | boolean | Yes |
quotedMsg | unknown | No |
quotedMsgObj | unknown | No |
senderId | string | No |
Additional provider fields may be present; narrow them before use.
SerializedMessageId
Type declaration
type SerializedMessageId = { _serialized: string }| Field | Type | Required |
|---|---|---|
_serialized | string | Yes |
Additional provider fields may be present; narrow them before use.
BusinessProfile
Type declaration
type BusinessProfile = { id: ContactId; tag?: string; description?: string; categories?: { id: string; localized_display_name: string }[]; profileOptions?: { commerceExperience: "catalog" | "none" | "shop"; cartEnabled: boolean }; email?: string; website?: string[]; businessHours?: { config: Record<string, { mode: "specific_hours" | "open_24h" | "appointment_only"; hours: number[][] }>; timezone: string }; catalogStatus?: string; address?: string; fbPage?: unknown; igProfessional?: unknown; isProfileLinked?: boolean; coverPhoto?: { id: string; url: string }; latitude?: number; longitude?: number }Related types: ContactId
| Field | Type | Required |
|---|---|---|
id | ContactId — ContactId | Yes |
tag | string | No |
description | string | No |
categories | { id: string; localized_display_name: string }[] | No |
profileOptions | { commerceExperience: "catalog" | "none" | "shop"; cartEnabled: boolean } | No |
email | string | No |
website | string[] | No |
businessHours | { config: Record<string, { mode: "specific_hours" | "open_24h" | "appointment_only"; hours: number[][] }>; timezone: string } | No |
catalogStatus | string | No |
address | string | No |
fbPage | unknown | No |
igProfessional | unknown | No |
isProfileLinked | boolean | No |
coverPhoto | { id: string; url: string } | No |
latitude | number | No |
longitude | number | No |
Additional provider fields may be present; narrow them before use.
CartItem
Type declaration
type CartItem = { id: string; name: string; qty: number; thumbnailId: string; thumbnailUrl: string }| Field | Type | Required |
|---|---|---|
id | string | Yes |
name | string | Yes |
qty | number | Yes |
thumbnailId | string | Yes |
thumbnailUrl | string | Yes |
Additional provider fields may be present; narrow them before use.
CommonGroup
Type declaration
type CommonGroup = { id: GroupId; title: string }Related types: GroupId
| Field | Type | Required |
|---|---|---|
id | GroupId — GroupId | Yes |
title | string | Yes |
Additional provider fields may be present; narrow them before use.
CommunityAdminIds
Type declaration
type CommunityAdminIds = { id: GroupChatId; admins: ContactId[]; subgroup: boolean }Related types: ContactId, GroupChatId
| Field | Type | Required |
|---|---|---|
id | GroupChatId — GroupChatId | Yes |
admins | ContactId[] — ContactId | Yes |
subgroup | boolean | Yes |
Additional provider fields may be present; narrow them before use.
CommunityAdmins
Type declaration
type CommunityAdmins = { id: GroupChatId; admins: Contact[]; subgroup: boolean }Related types: Contact, GroupChatId
| Field | Type | Required |
|---|---|---|
id | GroupChatId — GroupChatId | Yes |
admins | Contact[] — Contact | Yes |
subgroup | boolean | Yes |
Additional provider fields may be present; narrow them before use.
CommunityMetadata
Type declaration
type CommunityMetadata = { id: GroupId; subject: string; creation: number; owner?: ContactId; desc?: string; descTime?: number; descOwner?: ContactId; restrict?: boolean; announce?: boolean; participants: { id: ContactId; isAdmin: boolean; isSuperAdmin?: boolean }[]; subGroups: GroupMetadata[] }Related types: ContactId, GroupId, GroupMetadata
| Field | Type | Required |
|---|---|---|
id | GroupId — GroupId | Yes |
subject | string | Yes |
creation | number | Yes |
owner | ContactId — ContactId | No |
desc | string | No |
descTime | number | No |
descOwner | ContactId — ContactId | No |
restrict | boolean | No |
announce | boolean | No |
participants | { id: ContactId; isAdmin: boolean; isSuperAdmin?: boolean }[] — ContactId | Yes |
subGroups | GroupMetadata[] — GroupMetadata | Yes |
Additional provider fields may be present; narrow them before use.
CommunityParticipantIds
Type declaration
type CommunityParticipantIds = { id: GroupChatId; participants: ContactId[]; subgroup: boolean }Related types: ContactId, GroupChatId
| Field | Type | Required |
|---|---|---|
id | GroupChatId — GroupChatId | Yes |
participants | ContactId[] — ContactId | Yes |
subgroup | boolean | Yes |
Additional provider fields may be present; narrow them before use.
CommunityParticipants
Type declaration
type CommunityParticipants = { id: GroupChatId; participants: Contact[]; subgroup: boolean }Related types: Contact, GroupChatId
| Field | Type | Required |
|---|---|---|
id | GroupChatId — GroupChatId | Yes |
participants | Contact[] — Contact | Yes |
subgroup | boolean | Yes |
Additional provider fields may be present; narrow them before use.
ContactStatus
Type declaration
type ContactStatus = { id: string; status: string }| Field | Type | Required |
|---|---|---|
id | string | Yes |
status | string | Yes |
Additional provider fields may be present; narrow them before use.
FeatureFlags
WhatsApp feature flags keyed by name. Values are provider-defined and must be narrowed before use.
Type declaration
type FeatureFlags = Record<string, unknown>GroupCreationResult
Type declaration
type GroupCreationResult = { gid: GroupId | Id; status?: number; participants?: Record<string, { code: number; invite_code?: string; invite_code_exp?: string }> | Record<string, unknown>[] }| Field | Type | Required |
|---|---|---|
gid | GroupId | Id — GroupId, Id | Yes |
status | number | No |
participants | Record<string, { code: number; invite_code?: string; invite_code_exp?: string }> | Record<string, unknown>[] | No |
Additional provider fields may be present; narrow them before use.
HealthCheck
Browser health diagnostics. This is not the Easy API /health HTTP envelope.
Type declaration
type HealthCheck = { queuedMessages?: number; state?: string; isPhoneDisconnected?: boolean; isHere?: boolean; wapiInjected?: boolean; online?: boolean; tryingToReachPhone?: boolean; retryingIn?: number; batteryLow?: boolean }| Field | Type | Required |
|---|---|---|
queuedMessages | number | No |
state | string | No |
isPhoneDisconnected | boolean | No |
isHere | boolean | No |
wapiInjected | boolean | No |
online | boolean | No |
tryingToReachPhone | boolean | No |
retryingIn | number | No |
batteryLow | boolean | No |
Additional provider fields may be present; narrow them before use.
HostAccount
Host account attributes plus the current account ID. Additional WhatsApp Web attributes vary by version.
Type declaration
type HostAccount = { me: Id | ContactId }Additional provider fields may be present; narrow them before use.
LLMMessage
Type declaration
type LLMMessage = { role: "user" | "assistant"; content: string }| Field | Type | Required |
|---|---|---|
role | "user" | "assistant" | Yes |
content | string | Yes |
Additional provider fields may be present; narrow them before use.
Label
Type declaration
type Label = { id: string; name: string; items: ({ type: "Chat" | "Contact" | "Message"; id: string })[] }Related types: Chat, Contact, Message
| Field | Type | Required |
|---|---|---|
id | string | Yes |
name | string | Yes |
items | ({ type: "Chat" | "Contact" | "Message"; id: string })[] — Chat, Contact, Message | Yes |
Additional provider fields may be present; narrow them before use.
LicenseType
Type declaration
type LicenseType = "CUSTOM" | "B2B_RESTRICTED_VOLUME_LICENSE" | "Insiders Program" | "Text Story License Key" | "Image Story License Key" | "Video Story License Key" | "Premium License Key" | "NONE"Related types: Story
MessageInfo
Type declaration
type MessageInfo = { id: MessageId; deliveryRemaining: number; playedRemaining: number; readRemaining: number; delivery: MessageInteraction[]; read: MessageInteraction[]; played: MessageInteraction[] }Related types: MessageId, MessageInteraction
| Field | Type | Required |
|---|---|---|
id | MessageId — MessageId | Yes |
deliveryRemaining | number | Yes |
playedRemaining | number | Yes |
readRemaining | number | Yes |
delivery | MessageInteraction[] — MessageInteraction | Yes |
read | MessageInteraction[] — MessageInteraction | Yes |
played | MessageInteraction[] — MessageInteraction | Yes |
Additional provider fields may be present; narrow them before use.
MessageInteraction
Type declaration
type MessageInteraction = { id: ContactId; t: number }Related types: ContactId
| Field | Type | Required |
|---|---|---|
id | ContactId — ContactId | Yes |
t | number | Yes |
Additional provider fields may be present; narrow them before use.
NumberCheck
Type declaration
type NumberCheck = { id: Id | ContactId; status?: unknown; isBusiness?: boolean; canReceiveMessage: boolean; numberExists?: boolean }| Field | Type | Required |
|---|---|---|
id | Id | ContactId — ContactId, Id | Yes |
status | unknown | No |
isBusiness | boolean | No |
canReceiveMessage | boolean | Yes |
numberExists | boolean | No |
Additional provider fields may be present; narrow them before use.
NumberProfile
Provisional number profile based on the public Contact fields. Fields are optional and additional provider fields are unknown. The licensed getNumberProfile payload has not been verified against this model.
Type declaration
type NumberProfile = { id?: ContactId; name?: string | undefined; shortName?: string | undefined; pushname?: string | undefined; formattedName?: string | undefined; isBusiness?: boolean | undefined; isEnterprise?: boolean | undefined; isMe?: boolean | undefined; isMyContact?: boolean | undefined; isPSA?: boolean | undefined; isUser?: boolean | undefined; isWAContact?: boolean | undefined; labels?: string[] | undefined; msgs?: unknown[] | null | undefined; profilePicThumbObj?: { eurl?: string; id?: Id; img?: string; imgFull?: string; tag?: string } | undefined; statusMute?: boolean | undefined; type?: string | undefined; verifiedLevel?: number | undefined; verifiedName?: string | undefined; isOnline?: boolean | undefined; lastSeen?: number | undefined }| Field | Type | Required |
|---|---|---|
id | ContactId — ContactId | No |
name | string | undefined | No |
shortName | string | undefined | No |
pushname | string | undefined | No |
formattedName | string | undefined | No |
isBusiness | boolean | undefined | No |
isEnterprise | boolean | undefined | No |
isMe | boolean | undefined | No |
isMyContact | boolean | undefined | No |
isPSA | boolean | undefined | No |
isUser | boolean | undefined | No |
isWAContact | boolean | undefined | No |
labels | string[] | undefined | No |
msgs | unknown[] | null | undefined | No |
profilePicThumbObj | { eurl?: string; id?: Id; img?: string; imgFull?: string; tag?: string } | undefined — Id | No |
statusMute | boolean | undefined | No |
type | string | undefined | No |
verifiedLevel | number | undefined | No |
verifiedName | string | undefined | No |
isOnline | boolean | undefined | No |
lastSeen | number | undefined | No |
Additional provider fields may be present; narrow them before use.
Order
Type declaration
type Order = { id: string; createdAt: number; currency: string; products: CartItem[]; sellerJid: string; subtotal: string; total: string; message?: Message }Related types: Message, CartItem
| Field | Type | Required |
|---|---|---|
id | string | Yes |
createdAt | number | Yes |
currency | string | Yes |
products | CartItem[] — CartItem | Yes |
sellerJid | string | Yes |
subtotal | string | Yes |
total | string | Yes |
message | Message — Message | No |
Additional provider fields may be present; narrow them before use.
ProcessStats
Process diagnostics keyed by process ID. The provider controls each entry; no stable entry shape is guaranteed.
Type declaration
type ProcessStats = Record<string, unknown>Product
Type declaration
type Product = { id: string; currency: string; name?: string; description?: string; isHidden?: boolean; catalogWid?: string; url?: string; availability?: number | "unknown"; reviewStatus?: "NO_REVIEW" | "PENDING" | "REJECTED" | "APPROVED" | "OUTDATED"; imageCdnUrl?: string; imageCount?: number; additionalImageCdnUrl?: string[]; priceAmount1000?: number; retailerId?: string; t?: number }| Field | Type | Required |
|---|---|---|
id | string | Yes |
currency | string | Yes |
name | string | No |
description | string | No |
isHidden | boolean | No |
catalogWid | string | No |
url | string | No |
availability | number | "unknown" | No |
reviewStatus | "NO_REVIEW" | "PENDING" | "REJECTED" | "APPROVED" | "OUTDATED" | No |
imageCdnUrl | string | No |
imageCount | number | No |
additionalImageCdnUrl | string[] | No |
priceAmount1000 | number | No |
retailerId | string | No |
t | number | No |
Additional provider fields may be present; narrow them before use.
Story
Message-shaped status entry, based on the legacy story API. Chat and sender may be absent or null. The licensed getStories payload has not been verified against this model.
Type declaration
type Story = { id: MessageId; body: string; type: "chat" | "audio" | "ptt" | "image" | "video" | "document" | "sticker" | "location" | "vcard" | "multi_vcard" | "revoked" | "order" | "buttons_response" | "list_response" | "unknown"; t: number; notifyName?: string; from: ChatId; to: ChatId; self: "in" | "out"; ack: "ACK_PENDING" | "ACK_SERVER" | "ACK_DEVICE" | "ACK_READ" | "ACK_PLAYED" | -1 | "ACK_ERROR" | 0 | 1 | 2 | 3 | 4; invis?: boolean; isNewMsg?: boolean; star?: boolean; recvFresh?: boolean; broadcast?: boolean; isForwarded?: boolean; labels?: string[]; mentionedJidList?: ContactId[]; caption?: string; timestamp: number; content: string; isGroupMsg: boolean; isMMS?: boolean; isMedia: boolean; isNotification: boolean; isPSA?: boolean; fromMe: boolean; chatId: ChatId; author?: string; clientUrl?: string; deprecatedMms3Url?: string; isQuotedMsgAvailable: boolean; quotedMsg?: unknown; quotedMsgObj?: unknown; senderId?: string; chat?: Chat | null; sender?: Contact | null }Related types: ChatId, Chat, ContactId, Contact, MessageId
| Field | Type | Required |
|---|---|---|
id | MessageId — MessageId | Yes |
body | string | Yes |
type | "chat" | "audio" | "ptt" | "image" | "video" | "document" | "sticker" | "location" | "vcard" | "multi_vcard" | "revoked" | "order" | "buttons_response" | "list_response" | "unknown" | Yes |
t | number | Yes |
notifyName | string | No |
from | ChatId — ChatId | Yes |
to | ChatId — ChatId | Yes |
self | "in" | "out" | Yes |
ack | "ACK_PENDING" | "ACK_SERVER" | "ACK_DEVICE" | "ACK_READ" | "ACK_PLAYED" | -1 | "ACK_ERROR" | 0 | 1 | 2 | 3 | 4 | Yes |
invis | boolean | No |
isNewMsg | boolean | No |
star | boolean | No |
recvFresh | boolean | No |
broadcast | boolean | No |
isForwarded | boolean | No |
labels | string[] | No |
mentionedJidList | ContactId[] — ContactId | No |
caption | string | No |
timestamp | number | Yes |
content | string | Yes |
isGroupMsg | boolean | Yes |
isMMS | boolean | No |
isMedia | boolean | Yes |
isNotification | boolean | Yes |
isPSA | boolean | No |
fromMe | boolean | Yes |
chatId | ChatId — ChatId | Yes |
author | string | No |
clientUrl | string | No |
deprecatedMms3Url | string | No |
isQuotedMsgAvailable | boolean | Yes |
quotedMsg | unknown | No |
quotedMsgObj | unknown | No |
senderId | string | No |
chat | Chat | null — Chat | No |
sender | Contact | null — Contact | No |
Additional provider fields may be present; narrow them before use.
BookingContent
Type declaration
type BookingContent = { version?: 1; body: string; footer?: string; type: "booking"; title?: string; buttonLabel?: string; booking: { startAt: string; endAt?: string; location?: string; url?: string; managementUrl?: string; phoneNumber?: string; email?: string; description?: string; labels?: { language?: string; meetingType?: string; detailsTitle?: string; addToCalendar?: string; viewOnMap?: string; manageBooking?: string } }; actions?: (LinkAction | CallAction | CopyAction)[] }Related types: CallAction, CopyAction, LinkAction
| Field | Type | Required |
|---|---|---|
version | 1 | No |
body | string | Yes |
footer | string | No |
type | "booking" | Yes |
title | string | No |
buttonLabel | string | No |
booking | { startAt: string; endAt?: string; location?: string; url?: string; managementUrl?: string; phoneNumber?: string; email?: string; description?: string; labels?: { language?: string; meetingType?: string; detailsTitle?: string; addToCalendar?: string; viewOnMap?: string; manageBooking?: string } } | Yes |
actions | (LinkAction | CallAction | CopyAction)[] — CallAction, CopyAction, LinkAction | No |
Additional provider fields may be present; narrow them before use.
ButtonsContent
Type declaration
type ButtonsContent = { version?: 1; body: string; footer?: string; type: "buttons"; header?: InteractiveHeader; actions: InteractiveAction[] }Related types: InteractiveAction, InteractiveHeader
| Field | Type | Required |
|---|---|---|
version | 1 | No |
body | string | Yes |
footer | string | No |
type | "buttons" | Yes |
header | InteractiveHeader — InteractiveHeader | No |
actions | InteractiveAction[] — InteractiveAction | Yes |
Additional provider fields may be present; narrow them before use.
CallAction
Type declaration
type CallAction = { type: "call"; label: string; phoneNumber: string }| Field | Type | Required |
|---|---|---|
type | "call" | Yes |
label | string | Yes |
phoneNumber | string | Yes |
Additional provider fields may be present; narrow them before use.
CarouselCard
Type declaration
type CarouselCard = { body: string; header: { type: "image"; source: string; filename?: string; title?: string }; actions: InteractiveAction[] }Related types: InteractiveAction
| Field | Type | Required |
|---|---|---|
body | string | Yes |
header | { type: "image"; source: string; filename?: string; title?: string } | Yes |
actions | InteractiveAction[] — InteractiveAction | Yes |
Additional provider fields may be present; narrow them before use.
CarouselContent
Type declaration
type CarouselContent = { version?: 1; body: string; footer?: string; type: "carousel"; cards: CarouselCard[] }Related types: CarouselCard
| Field | Type | Required |
|---|---|---|
version | 1 | No |
body | string | Yes |
footer | string | No |
type | "carousel" | Yes |
cards | CarouselCard[] — CarouselCard | Yes |
Additional provider fields may be present; narrow them before use.
CopyAction
Type declaration
type CopyAction = { type: "copy"; label: string; code: string }| Field | Type | Required |
|---|---|---|
type | "copy" | Yes |
label | string | Yes |
code | string | Yes |
Additional provider fields may be present; narrow them before use.
FormContent
Type declaration
type FormContent = { version?: 1; body: string; footer?: string; type: "form"; title?: string; questions: FormQuestion[] }Related types: FormQuestion
| Field | Type | Required |
|---|---|---|
version | 1 | No |
body | string | Yes |
footer | string | No |
type | "form" | Yes |
title | string | No |
questions | FormQuestion[] — FormQuestion | Yes |
Additional provider fields may be present; narrow them before use.
FormQuestion
Type declaration
type FormQuestion = { type: "singleSelect" | "multiSelect"; id: string; label: string; options: { id: string; label: string }[]; allowCustomAnswer?: boolean }| Field | Type | Required |
|---|---|---|
type | "singleSelect" | "multiSelect" | Yes |
id | string | Yes |
label | string | Yes |
options | { id: string; label: string }[] | Yes |
allowCustomAnswer | boolean | No |
Additional provider fields may be present; narrow them before use.
FormResponse
Type declaration
type FormResponse = { messageId: string; chatId: string; senderId: string; originalMessageId?: string; timestamp?: number; raw: JsonObject; type: "form"; answers: Record<string, string | string[]> }Related types: JsonObject
| Field | Type | Required |
|---|---|---|
messageId | string | Yes |
chatId | string | Yes |
senderId | string | Yes |
originalMessageId | string | No |
timestamp | number | No |
raw | JsonObject — JsonObject | Yes |
type | "form" | Yes |
answers | Record<string, string | string[]> | Yes |
Additional provider fields may be present; narrow them before use.
InteractiveAction
Type declaration
type InteractiveAction = ReplyAction | LinkAction | CallAction | CopyActionRelated types: CallAction, CopyAction, LinkAction, ReplyAction
InteractiveContent
Type declaration
type InteractiveContent = ButtonsContent | ListContent | FormContent | CarouselContent | BookingContent | NativeContentRelated types: BookingContent, ButtonsContent, CarouselContent, FormContent, ListContent, NativeContent
InteractiveHeader
Type declaration
type InteractiveHeader = { type: "text"; text: string } | { type: "image"; source: string; filename?: string; title?: string } | { type: "video"; source: string; filename?: string; title?: string } | { type: "document"; source: string; filename?: string; title?: string }InteractiveResponse
Type declaration
type InteractiveResponse = FormResponse | { messageId: string; chatId: string; senderId: string; originalMessageId?: string; timestamp?: number; raw: JsonObject; type: "reply"; id: string; label?: string } | { messageId: string; chatId: string; senderId: string; originalMessageId?: string; timestamp?: number; raw: JsonObject; type: "list"; id: string; label?: string } | { messageId: string; chatId: string; senderId: string; originalMessageId?: string; timestamp?: number; raw: JsonObject; type: "native"; name: string; parameters?: JsonValue; parseError?: string }Related types: FormResponse, JsonObject, JsonValue
JsonObject
Type declaration
type JsonObject = Record<string, JsonValue>Related types: JsonValue
JsonValue
Type declaration
type JsonValue = null | boolean | number | string | JsonValue[] | Record<string, JsonValue>LinkAction
Type declaration
type LinkAction = { type: "url"; label: string; url: string }| Field | Type | Required |
|---|---|---|
type | "url" | Yes |
label | string | Yes |
url | string | Yes |
Additional provider fields may be present; narrow them before use.
ListContent
Type declaration
type ListContent = { version?: 1; body: string; footer?: string; type: "list"; title?: string; buttonLabel?: string; sections: { title?: string; rows: ListRow[] }[] }Related types: ListRow
| Field | Type | Required |
|---|---|---|
version | 1 | No |
body | string | Yes |
footer | string | No |
type | "list" | Yes |
title | string | No |
buttonLabel | string | No |
sections | { title?: string; rows: ListRow[] }[] — ListRow | Yes |
Additional provider fields may be present; narrow them before use.
ListRow
Type declaration
type ListRow = { id: string; title: string; description?: string }| Field | Type | Required |
|---|---|---|
id | string | Yes |
title | string | Yes |
description | string | No |
Additional provider fields may be present; narrow them before use.
NativeAction
Type declaration
type NativeAction = { name: string; parameters?: JsonObject }Related types: JsonObject
| Field | Type | Required |
|---|---|---|
name | string | Yes |
parameters | JsonObject — JsonObject | No |
Additional provider fields may be present; narrow them before use.
NativeContent
Advanced extension for new native action types; parameters are passed through without claiming recipient support
Type declaration
type NativeContent = { version?: 1; body: string; footer?: string; type: "native"; header?: InteractiveHeader; actions: NativeAction[]; parameters?: JsonObject }Related types: InteractiveHeader, JsonObject, NativeAction
| Field | Type | Required |
|---|---|---|
version | 1 | No |
body | string | Yes |
footer | string | No |
type | "native" | Yes |
header | InteractiveHeader — InteractiveHeader | No |
actions | NativeAction[] — NativeAction | Yes |
parameters | JsonObject — JsonObject | No |
Additional provider fields may be present; narrow them before use.
ReplyAction
Type declaration
type ReplyAction = { type: "reply"; id: string; label: string }| Field | Type | Required |
|---|---|---|
type | "reply" | Yes |
id | string | Yes |
label | string | Yes |
Additional provider fields may be present; narrow them before use.
Was this helpful?
Your answer includes the page path and docs version.
