Privacy, GDPR and LGPD for WhatsApp developers

A developer checklist for personal data in WhatsApp products: roles, inventory, deletion, security and incidents. Engineering guidance, not legal advice.

A WhatsApp integration moves personal data by definition: phone numbers, names, message content, sometimes photos and locations. Data protection laws such as the GDPR in the European Union and the LGPD in Brazil attach obligations to that, and developers end up implementing most of them in schemas, queues and deletion jobs. This article translates the engineering side into a checklist. It is general technical guidance, not legal advice; the specifics for any product should be confirmed with qualified counsel.

Who is the controller and who is the processor?

Usually the business that messages its own customers is the controller, and a platform that stores and routes those messages on its behalf acts as a processor or operator. Both GDPR and LGPD use that split, and which role applies to you should be settled in contracts with counsel, not assumed in code.

The distinction changes what you build. A platform acting for its customers needs to follow their documented instructions, support their deletion requests, keep records of processing and be able to list its own sub-processors. The LGPD explicitly requires controllers and operators to keep records of the processing operations they perform. WhatsApp's own policy adds platform-level rules: businesses are responsible for obtaining the notices, permissions and consent they need and for keeping a published privacy policy, data obtained through the platform about a contacted person may be used only to support messaging with that person (with an exception for conversation content), and conversation content must not be shared with other customers.

What belongs in a personal data inventory?

An inventory lists each category of personal data, where it is stored, why, for how long and who can access it. Without it, answering an access or deletion request becomes a search through every system.

DataWhere it landsWhy it existsRetention owner
Phone number (WhatsApp ID)Contacts, events, logs, queuesAddressing messagesTenant policy
Profile nameContacts table, inbound event payloadsDisplay in inboxTenant policy
Message text and mediaMessage content store, object storageSupport and product featuresTenant policy
Raw webhook payloadReplay buffer, error logsDebugging and replayShort fixed window
Consent recordConsent tableProof of permission and opt-out stateKept while relationship exists

Add rows for the places teams forget: error trackers that capture request bodies, analytics events, search indexes, data warehouse copies and support tool attachments. Every extra copy is an extra deletion target.

How do you minimise what is collected and kept?

Store only fields the feature needs, separate identifying data from content, and give each class an expiry. Minimisation is cheapest at design time and most expensive after a year of accumulated logs.

  • Do not store raw webhook bodies beyond the replay window; store the normalised fields you need.
  • Hash or truncate phone numbers in analytics events; keep the full number only where messaging requires it.
  • Keep message content out of general application logs and out of error trackers.
  • Prefer references to media over copies, and expire copies on a schedule.
  • Never ask users to send payment card numbers, account numbers or ID numbers in chat; the WhatsApp policy tells businesses not to collect or request that kind of sensitive information.

The retention design in the message-logging article of this series gives a concrete schema with expiry columns, and the pattern applies here unchanged.

How do you support access and deletion requests?

Build one internal operation that finds everything about a contact across stores and either exports or erases it, and make it testable. Ad hoc scripts written during a deadline are how requests get partially fulfilled.

LGPD article 18 lists the rights of data subjects, including confirmation of processing, access, correction, anonymisation, blocking or elimination of unnecessary or unlawfully processed data, portability and revocation of consent. GDPR gives comparable rights, including erasure under conditions. Both have exceptions, so the operation should log what was erased and what was retained and why, rather than silently skipping rows.

// one entry point for a data subject request, scoped by tenant async function eraseContact(tenantId, contactId, requestRef) { const targets = [contacts, messageContent, messageEvent, consent, searchIndex, objectStore] const report = [] for (const t of targets) { const n = await t.deleteForContact(tenantId, contactId) // anonymise where deletion is not allowed report.push({ store: t.name, affected: n }) } await auditLog.write({ tenantId, requestRef, action: 'erase_contact', report }) return report }

Notice the audit log records counts per store, not the data erased. Notice also that a tenant-scoped request should never reach into another tenant's rows; the multi-tenant architecture article covers that boundary.

Which security measures does this imply?

Encrypt in transit and at rest, scope credentials narrowly, verify webhook signatures, restrict access to content and log access. Both regimes expect appropriate technical and organisational measures, and LGPD article 46 asks that they apply from the design stage.

  • Verify every incoming webhook signature before processing; the webhooks reference shows how.
  • Give each tenant and integration its own scoped credential; see authentication.
  • Encrypt databases, backups and object storage, and restrict who can decrypt.
  • Record who reads message content and why.
  • Keep secrets out of logs, repositories and chat tools, and rotate them on a schedule.

Meta notes that webhook notifications can be protected with mutual TLS and that its IP addresses change periodically, which is why it suggests mTLS instead of maintaining an IP allowlist. That is an example of the kind of control a security review will ask about.

What should an incident process contain?

An incident process names who decides, how affected tenants are told and what evidence is kept. Both laws have breach-notification duties that run on short clocks, so the process must exist before the incident.

The LGPD requires the controller to notify the national authority and affected data subjects of incidents that may cause relevant risk or harm, describing the data, the risks and the measures taken. The GDPR has its own notification duty with a deadline. As an operator or processor, your obligation is typically to tell the controller quickly, which means your customers need a contact and your contracts need a stated notice period. Prepare the runbook now: how to revoke all credentials for a tenant, how to pause its endpoints, how to list which records were exposed and where the audit trail lives.

Frequently asked questions

Is a WhatsApp phone number personal data?

In most data protection frameworks a phone number that identifies a person counts as personal data, which is why the inventory should list it everywhere it appears. Confirm the classification for your situation with counsel.

Can I use contact data from the API for other purposes?

WhatsApp's policy says data obtained through the platform about a contacted person may be used only to support messaging with that person, apart from conversation content, which has its own rules. Check the current policy text before adding a new use.

Does this article replace legal advice?

No. It describes engineering practice. Roles, legal bases, retention periods and notification duties depend on your facts and jurisdiction and should be confirmed with qualified counsel.

Fontes

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