Interface WhatsAppCallEventPayload

A WhatsApp Calling lifecycle or signaling event (call.event).

interface WhatsAppCallEventPayload {
    call:
        | {
            connection?: Record<string, unknown>;
            direction?: string;
            event: string;
            from?: string;
            id: string;
            session?: Record<string, unknown>;
            timestamp?: string | number;
            to?: string;
            [key: string]: unknown;
        }
        | {
            id: string;
            recipient_id?: string;
            status: string;
            timestamp?: string
            | number;
            type?: string;
            [key: string]: unknown;
        };
    channel_id: string;
    contacts: Record<string, unknown>[];
    display_phone_number: null | string;
    errors: Record<string, unknown>[];
    kind: "status" | "call";
    object: "whatsapp_call";
    phone_number_id: string;
}

Properties

call:
    | {
        connection?: Record<string, unknown>;
        direction?: string;
        event: string;
        from?: string;
        id: string;
        session?: Record<string, unknown>;
        timestamp?: string | number;
        to?: string;
        [key: string]: unknown;
    }
    | {
        id: string;
        recipient_id?: string;
        status: string;
        timestamp?: string
        | number;
        type?: string;
        [key: string]: unknown;
    }

Original Meta call object, including SDP/connection data when supplied.

channel_id: string
contacts: Record<string, unknown>[]
display_phone_number: null | string
errors: Record<string, unknown>[]

Meta call errors supplied alongside the item.

kind: "status" | "call"

Whether Meta supplied this item in calls[] or statuses[].

object: "whatsapp_call"
phone_number_id: string