Send a contact card
Pass the contact fields directly tosendContactCard — the SDK generates the
vCard, uploads it, and attaches it to a message in one call.
Supported fields
Add a contact photo
Upload the photo viaPOST /v1/files first, then pass the returned file ID
as photo. The SDK downloads it, sniffs the image type (JPEG / PNG), and
embeds it inline in the vCard.
Keep photos small (under 100KB) for the best delivery experience. Large photos
inflate the vCard significantly once base64-encoded.
Advanced: custom vCard
If you need fields thatsendContactCard doesn’t expose (exotic TYPE
combinations, custom X- extensions, multiple addresses), build the vCard
yourself and send it via the file + attachment flow:
vCard format reference
For reference when building custom vCards, a full-featured example:Common fields
The MIME type for vCard files is
text/vcard, the file extension is .vcf,
and lines are joined with \r\n.