Send contact cards on WhatsApp via API

Send contact cards through the CRPRO Hub: required fields, what wa_id changes on the card, the 20-contact cap and fields Meta allows that the Hub does not.

A contacts message sends one or more contact cards that the recipient can save with a tap. Typical uses are sharing a support line, a technician's number or a branch's details. It is a compact payload with many optional fields, and two points trip people up: the wa_id inside a phone entry changes which buttons the customer sees, and the Hub accepts a narrower set of fields than Meta documents. This tutorial covers both.

What does a contacts message look like?

Short answer: type is contacts, and contacts is an array of contact objects. Each contact needs a name.formatted_name; everything else is optional.

curl -X POST https://crprohub.com/api/v1/channels/CHANNEL_UUID/messages \ -H "Authorization: Bearer hub_pk_EXAMPLE_NOT_REAL" \ -H "Idempotency-Key: share-support-contact-1042" \ -H "Content-Type: application/json" \ -d '{ "to": "5521999999999", "type": "contacts", "contacts": [{ "name": { "formatted_name": "Example Support", "first_name": "Example", "last_name": "Support" }, "phones": [{ "phone": "+5521988887777", "type": "WORK", "wa_id": "5521988887777" }], "emails": [{ "email": "support@example.com", "type": "WORK" }], "org": { "company": "Example Ltd", "title": "Customer support" }, "urls": [{ "url": "https://example.com/support", "type": "WORK" }] }] }'

As with every other type, the Hub answers 202 with a message_id once the message is accepted. Meta's reference says formatted_name is the name displayed next to the profile arrow in the chat, so choose text that the customer will recognise.

Which contact fields does the Hub accept?

Short answer: name, phones, emails, urls, org and birthday. Meta also documents addresses, but the Hub's schema does not define that field, so a contact that includes it is refused.

FieldHub rule
contacts1 to 20 contact objects per message
name.formatted_nameRequired, up to 512 characters
name.first_name, last_name, middle_nameOptional, up to 256 characters each
name.prefix, suffixOptional, up to 64 characters each
phonesUp to 20; phone up to 32 characters; type CELL, MAIN, IPHONE, HOME or WORK; optional wa_id up to 32 characters
emailsUp to 20; valid email address; type HOME or WORK
urlsUp to 20; valid URL; type HOME or WORK
orgcompany, department, title, each up to 256 characters
birthdayYYYY-MM-DD

Two differences from Meta's page matter. First, Meta allows a message to include up to 257 contacts and merely recommends fewer; the Hub caps a message at 20. Second, Meta lists an addresses array with street, city, state, zip, country, country_code and type; the Hub does not accept it. If a card must carry a postal address, put it in the org or in a text message that accompanies the card. Unknown fields fail with 400 INVALID_MESSAGE rather than being silently dropped, which is useful because you find out immediately.

What does wa_id change for the recipient?

Short answer: with wa_id the card shows Message and Save contact buttons. Without it, the card shows an Invite to WhatsApp button instead.

This behaviour comes from Meta's contacts reference. If the number in the card belongs to a WhatsApp user and you know their wa_id, include it, and the recipient can start a chat straight from the card. If you only know a phone number, omit wa_id and the recipient is offered an invitation. The value of wa_id is the WhatsApp identifier in digits with the country code, for example 5521988887777. It is not always identical to the number as typed by a person, which is the subject of the phone number format tutorial in this series. Never guess a wa_id from a formatted number: a wrong one leads to a broken Message button.

How can contact cards be built from existing records?

Short answer: map your record to the Hub's fields in one function, drop empty values and let the schema reject anything left over.

function contactCard(person) { const card = { name: { formatted_name: person.displayName, first_name: person.firstName, last_name: person.lastName, }, } if (person.mobile) { card.phones = [{ phone: person.mobile, type: 'CELL', ...(person.waId && { wa_id: person.waId }) }] } if (person.email) card.emails = [{ email: person.email, type: 'WORK' }] if (person.company) card.org = { company: person.company, title: person.role } return card } const body = { to: '5521999999999', type: 'contacts', contacts: [contactCard(technician)], }

Leaving undefined values in the object is harmless in JSON.stringify, which drops them, but an empty string for a field with a format, such as email or birthday, fails validation. Build the object only from values you actually have. The authenticated request itself is covered in the quickstart.

What happens on the recipient's phone?

Short answer: the card appears as a message the customer can open, save or message. Meta warns that recipients may not support all contact metadata, especially on a primary device.

Treat the card as a convenience, not as a guarantee that every field will land in the address book. The name and the phone are the dependable parts; the organisation, the URL and the birthday may be ignored by some clients. For anything the customer must not miss, repeat the essential information in a short text message sent next to the card. As a free-form message, a contacts message also needs an open 24-hour service window, and delivery results come through message.status events described in the webhooks reference.

Validation is strict on formats, so most rejected contact messages come from data quality rather than from the API. An email without an at sign, a birthday written as 31/10/1990 instead of 1990-10-31 and a type value in lower case (the Hub expects WORK, not work) are the three usual culprits. Normalise those values where the contact record is created, and the send path stays simple. A request refused with a 400 is a request to fix rather than to retry unchanged.

What are the sending limits to keep in mind?

Short answer: 20 contacts per message at the Hub, 60 messages per minute per channel and 120 requests per minute per organization and credential.

Even though a single message may carry many cards, Meta recommends fewer for usability and to avoid negative feedback from recipients. Sending a long list as one message makes the chat hard to read; two or three cards are plenty for most cases. If you need to share a directory, send a link to a page instead.

How should contact cards be used responsibly?

Short answer: share only details the person has agreed to share, keep cards few and keep the essentials in text.

A contact card hands over personal data, so the first question is whether the owner of that data expects it to be shared. A support line or a branch number is fine; a staff member's mobile number may not be. Beyond privacy, usability matters: Meta advises fewer contacts per message to avoid negative feedback from recipients, and a card that arrives unannounced can look like spam. A short text before it, explaining who the contact is and why they are being shared, makes the message understandable on its own.

  • Confirm that the person or team agrees to be shared.
  • Introduce the card with one line of text.
  • Prefer one or two cards over a long list.
  • Include wa_id only when it is verified for that number.
  • Keep the details accurate; stale cards cause misdirected messages.

What happens after the customer receives a card?

Short answer: the customer may save it, message the number or ignore it. Your system receives no event for saving or ignoring a contact.

The only signals you get are the usual status events for the card message and any message the customer sends next. If the card includes a wa_id, the Message button lets the customer start a conversation with that number, which may be a different line from the one you are sending from. Make sure that line is monitored. Otherwise a customer who taps the button reaches an unattended account, and the experience of your product suffers for a reason your own logs cannot show you. When the number belongs to another team or business, agree in advance who answers and during which hours.

  • Confirm that the shared number is attended.
  • Tell the customer what the contact is for.
  • Do not assume a saved contact means the customer will use it.
  • Review the cards periodically so numbers do not go stale.

Frequently asked questions

Is formatted_name the only required field?

Inside a contact, yes: name.formatted_name is required and everything else is optional. The message itself requires at least one contact.

Can a contact include a postal address?

Meta documents an addresses field, but the Hub's schema does not accept it, so the request is refused with 400 INVALID_MESSAGE. Share the address in a text or location message instead.

What is the difference between phone and wa_id?

phone is the number as shown on the card. wa_id is the WhatsApp identifier of that number, in digits. Including wa_id gives the recipient Message and Save buttons; omitting it gives an Invite to WhatsApp button.

How many contacts can one message carry?

The Hub accepts between 1 and 20. Meta's reference allows up to 257 but advises fewer.

Fontes

Documentação oficial da Meta, conferida em 31 de outubro de 2026.