Interface WhatsAppContact

A contact card. name.formatted_name is required, and Meta additionally requires at least one other name part (first/last/middle/suffix/prefix) — the API rejects a card without one rather than passing it on.

phones[].wa_id makes a number tappable as a WhatsApp contact in the card.

interface WhatsAppContact {
    addresses?: {
        city?: string;
        country?: string;
        country_code?: string;
        state?: string;
        street?: string;
        type?: "HOME" | "WORK";
        zip?: string;
    }[];
    birthday?: string;
    emails?: { email: string; type?: "HOME"
    | "WORK" }[];
    name: {
        first_name?: string;
        formatted_name: string;
        last_name?: string;
        middle_name?: string;
        prefix?: string;
        suffix?: string;
    };
    org?: { company?: string; department?: string; title?: string };
    phones?: { phone: string; type?: "HOME" | "WORK"; wa_id?: string }[];
    urls?: { type?: "HOME" | "WORK"; url: string }[];
}

Properties

addresses?: {
    city?: string;
    country?: string;
    country_code?: string;
    state?: string;
    street?: string;
    type?: "HOME" | "WORK";
    zip?: string;
}[]
birthday?: string

YYYY-MM-DD.

emails?: { email: string; type?: "HOME" | "WORK" }[]
name: {
    first_name?: string;
    formatted_name: string;
    last_name?: string;
    middle_name?: string;
    prefix?: string;
    suffix?: string;
}
org?: { company?: string; department?: string; title?: string }
phones?: { phone: string; type?: "HOME" | "WORK"; wa_id?: string }[]
urls?: { type?: "HOME" | "WORK"; url: string }[]