Enable or disable the WhatsApp conversational-agent add-on
const url = 'https://api.emite.cr/v1/billing/whatsapp-agent-addon';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"enabled":true,"expectedChargeCentimos":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.emite.cr/v1/billing/whatsapp-agent-addon \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "enabled": true, "expectedChargeCentimos": 1 }'Universal add-on on any subscribed tier. NO plan includes the agent — not even the sales-led ones — because its cost is model inference and grows with use. Enabling CHARGES the saved card now for the whole days that remain to the plan's next monthly anniversary (GET /billing/addon-quote says how much), and from then on it renews every month as its own Onvo subscription; disabling stops the renewal and the add-on runs to the end of the period already paid for. Requires a recurring subscription. Off by default.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Enable (true) or disable (false) the add-on.
Only when ENABLING: what the customer was told the card would be charged, in céntimos — chargeCentimos of GET /billing/addon-quote. If the purchase would charge anything else (the quote moves when a day boundary is crossed) it is refused with 409 ADDON_QUOTE_CHANGED and nothing is collected; ask for the quote again. Omit it to buy at whatever the quote is at that instant.
Examplegenerated
{ "enabled": true, "expectedChargeCentimos": 1}Responses
Section titled “Responses”object
The resulting add-on state.
Examplegenerated
{ "whatsappAgentAddon": true}