Invite contacts and collect opt-in

⚠️ This endpoint triggers outbound messaging

Imports WhatsApp contacts and sends a compliant opt-in template message to request user consent for future communication. Use this feature to initiate compliant first contact with users without an existing WhatsApp opt-in.

Description

This import process uploads contacts and automatically sends a predefined WhatsApp opt-in template to each contact.
Recipients can explicitly accept (opt-in) or decline (opt-out) future communication.
The import supports TXT and CSV files and allows attaching additional contact metadata.
This functionality is WhatsApp-specific.

Use case

Use this endpoint when:

Compliance requirements

  • Sending proactive WhatsApp messages requires explicit user consent
  • Consent must be obtained through a traceable channel
  • Failure to comply with GDPR or WhatsApp/Meta policies may result in:
    • users reporting messages as spam
    • account suspension or permanent blocking by Meta
  • The caller is responsible for ensuring compliance.

Automatic labeling and status handling

  • Every imported contact is automatically assigned the label: Opt-In Campaign
  • Contacts that reject the WhatsApp invitation are marked as opted out
  • Opted-out contacts can be filtered using: “Unsubscribed contacts”

WhatsApp opt-in template

  • The template whatsapp_opt_in is sent automatically to all imported contacts
  • The template is available by default in every inbox
  • Template customization is possible via:
    • API (/core/templates) -> Template button payloads must remain compatible with the opt-in flow.
    • Support request


ENDPOINTAPI Reference

POST /inbox/channels/:channel_id/import-contacts/whatsapp

Imports contacts with notification and opt-in request
Use this endpoint for opt-in collection.
This endpoint triggers outbound messaging.

Supported across WhatsApp only.

Example for txt or csv

whatsapp,name,marketing_opted_in,marketing_opted_out,labels,phone,email,shoesize,User Name,new attribute
"4912345678","Max Mustermann","2023-09-25 08:30:14","2023-09-26 09:10:59","Bestandskunde",,,,,
"4922222222","Maria Mustermann",,"2023-09-26 09:10:59",,"Label1;label2;label3",
"030398864","[email protected]","38","Mia Maria","Attr 4"

Did this page help you?