Send a contact card and the recipient sees a rich contact preview they can tap to save directly to their contacts, with call / text / email action buttons.Documentation Index
Fetch the complete documentation index at: https://messages.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
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
| Field | Type | Description |
|---|---|---|
firstName, lastName | string | Required. Used for both N and FN in the vCard. |
phones | { value, type? }[] | One or more phone numbers. type defaults to cell. |
emails | { value, type? }[] | One or more email addresses. type is optional. |
org | string | Organization / company. |
title | string | Job title. |
url | string | Website. |
address | { street?, city?, region?, postalCode?, country?, type? } | Mailing address. |
bday | string | Birthday, ISO YYYY-MM-DD. |
note | string | Free-text note. Reserved characters (;, ,, newlines) are escaped automatically. |
photo | string | File ID (file_...) of a JPEG or PNG uploaded via POST /v1/files. The SDK fetches it and embeds it inline in the vCard. |
photoType | "JPEG" | "PNG" | Override photo mime type when auto-detection from the file’s magic bytes can’t determine it. |
text | string | Optional message text sent alongside the card. |
replyTo | string | Message ID or GUID to reply to. |
filename | string | Override the uploaded .vcf filename. Default: <first>-<last>.vcf. |
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
| Field | Example | Description |
|---|---|---|
N | Doe;Jane;;; | Last; First; Middle; Prefix; Suffix |
FN | Jane Doe | Full display name |
TEL;TYPE=CELL | +15559876543 | Mobile phone |
TEL;TYPE=WORK | +15551112222 | Work phone |
EMAIL | jane@acme.com | Email address |
ORG | Acme Corp | Organization |
TITLE | Head of Engineering | Job title |
URL | https://acme.com | Website |
ADR;TYPE=WORK | ;;123 Main St;City;ST;ZIP;US | Address |
NOTE | Met at WWDC 2025 | Free-text note |
BDAY | 1990-06-15 | Birthday |
PHOTO;ENCODING=b;TYPE=JPEG | <base64> | Inline photo |
text/vcard, the file extension is .vcf,
and lines are joined with \r\n.