API guide
Respect consent and messaging windows
Record how the person opted in
Marketing messages require an opted-in subscriber. When creating a subscriber, supply the consent source, wording and collection time when available. Importing a phone number is not a substitute for permission.
An opted-out person cannot be re-subscribed by adding, importing or updating them through the API. Only the person can opt back in through the opt-in flow. Treat subscriber_opted_out as a permanent stop for that message.
Choose the right kind of message
Free-form messages support text only. Free text is allowed only within 24 hours of the person's last inbound WhatsApp message. Outside that window, use an approved template. Approval can change; inspect template_not_approved and refresh template data when necessary.
Utility messages to a non-subscriber require transactional: true and a suitable utility template. A STOP blocks marketing and utility messages, including transactional sends to numbers that are not subscribers. Authentication OTP codes explicitly requested by the person remain allowed after STOP. Never use that exception for marketing.