Skip to main content
When your bot answers the customer, your bot is the one that hears “stop sending me offers”. Minimo doesn’t read that conversation for you, so you have to tell it. One API call records the opt-out, and from then on Minimo stops sending marketing to that customer on every channel your company’s opt-out scope covers.
Opting out is a legal obligation (GDPR, WhatsApp Business Policy). If your bot detects the intent, record it before you reply.

The flow

1

Detect the intent

Your bot classifies the inbound message (message.text in the webhook envelope) as a request to stop marketing: “unsubscribe”, “stop”, “non voglio più ricevere messaggi”, “cancellami”.
2

Record the opt-out in Minimo

Call POST /public/v1/contacts/opt-out with the sender’s contact.phone. The same WhatsApp-only API key you use to send works.
3

Confirm to the customer

Reply with what actually changed. The response’s revokedChannels tells you whether it was only WhatsApp or every marketing channel.

Example

sendWhatsappText is your call to Send. The reply is a session message inside the 24-hour window the customer just opened, so it is not marketing.

What changes

  • Marketing campaigns and marketing WhatsApp templates skip this contact.
  • Transactional email and utility templates keep working: order updates, reminders, account emails.
  • The opt-out appears on the contact’s timeline in Minimo, with source api and your reason.
  • Calling it again for the same contact is harmless (idempotent).

Doing it without code

  • Minimo’s AI assistant does this natively when it answers the conversation itself (WhatsApp or email). Use this API only when your own bot answers.
  • AI agents over MCP can call the minimo_contact_opt-out tool. See Connect your agent.