curl --request POST \
--url https://api.minimo.it/public/v1/templates/whatsapp/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"recipient": "393471234567",
"type": "template",
"template": {
"id": "3NQCOSX",
"components": [
{
"type": "BODY",
"parameters": [
{
"type": "text",
"text": "John"
},
{
"type": "text",
"text": "ORD-12345"
}
]
}
]
}
}
'{
"data": {
"success": true
}
}{
"error": "Missing recipient phone number"
}{
"error": "Failed to send the message"
}Send a Message
Reply with a text, an approved template, media or quick-reply buttons
curl --request POST \
--url https://api.minimo.it/public/v1/templates/whatsapp/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"recipient": "393471234567",
"type": "template",
"template": {
"id": "3NQCOSX",
"components": [
{
"type": "BODY",
"parameters": [
{
"type": "text",
"text": "John"
},
{
"type": "text",
"text": "ORD-12345"
}
]
}
]
}
}
'{
"data": {
"success": true
}
}{
"error": "Missing recipient phone number"
}{
"error": "Failed to send the message"
}type:
text: a free-form message, only inside the 24-hour window opened by the contact’s last message. This is how a bot replies.template: an approved template, any time. Needed to write first or after the 24-hour window.image,video,audio,document,sticker: a media message, withmedia. Also only inside the 24-hour window.
WhatsApp or Transactional. The workspace comes from the API key: never send a companyId.
To know whether a message was delivered, read or failed, subscribe your webhook to
whatsapp.message.status.
Send a session text
Use this to reply to an inbound message from your bot. It only succeeds inside the 24-hour window opened by the customer’s last message — which is exactly the case when you are answering a reply.curl https://api.minimo.it/public/v1/templates/whatsapp/send \
-H "Authorization: Bearer YOUR_MINIMO_KEY" \
-H "Content-Type: application/json" \
-X POST \
-d '{
"recipient": "393391234567",
"type": "text",
"text": "Thanks for your message! A contract draft is on its way."
}'
const res = await fetch('https://api.minimo.it/public/v1/templates/whatsapp/send', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_MINIMO_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
recipient: '393391234567',
type: 'text',
text: 'Thanks for your message! A contract draft is on its way.',
}),
});
const data = await res.json(); // { success: true }
import requests
requests.post(
"https://api.minimo.it/public/v1/templates/whatsapp/send",
headers={"Authorization": "Bearer YOUR_MINIMO_KEY"},
json={
"recipient": "393391234567",
"type": "text",
"text": "Thanks for your message! A contract draft is on its way.",
},
)
Send a template
Templates are required to start a conversation or to message outside the 24-hour window.curl https://api.minimo.it/public/v1/templates/whatsapp/send \
-H "Authorization: Bearer YOUR_MINIMO_KEY" \
-H "Content-Type: application/json" \
-X POST \
-d '{
"recipient": "393391234567",
"type": "template",
"template": {
"name": "order_confirmation",
"languageCode": "it",
"components": [
{
"type": "BODY",
"parameters": [
{ "type": "text", "text": "Jane Doe" },
{ "type": "text", "text": "ORD-12345" }
]
}
]
}
}'
curl https://api.minimo.it/public/v1/templates/whatsapp/send \
-H "Authorization: Bearer YOUR_MINIMO_KEY" \
-H "Content-Type: application/json" \
-X POST \
-d '{
"recipient": "393391234567",
"type": "template",
"template": {
"id": "K3J9XQ2",
"components": [
{
"type": "BODY",
"parameters": [
{ "type": "text", "text": "Jane Doe" },
{ "type": "text", "text": "ORD-12345" }
]
}
]
}
}'
UTILITY / AUTHENTICATION / MARKETING), the 24-hour window, named vs. positional
variables and the full component reference are covered in detail on Send WhatsApp
Template. This page documents the same endpoint from the
“connect your bot” angle.Send media
Settype to the media kind and pass a media object. The file is addressed exactly one way —
media.link (a public URL the provider fetches) or media.providerMediaId (a media already
uploaded to the sending number). A caption is supported on image / video / document; a
filename only on document; a sticker takes neither. Like a session text, media is only
deliverable inside the 24-hour customer window.
# Image by public URL, with a caption
curl https://api.minimo.it/public/v1/templates/whatsapp/send \
-H "Authorization: Bearer YOUR_MINIMO_KEY" \
-H "Content-Type: application/json" \
-X POST \
-d '{
"recipient": "393391234567",
"type": "image",
"media": {
"link": "https://cdn.example.com/welcome.jpg",
"caption": "Welcome aboard!"
}
}'
# Document by a pre-uploaded provider media id
curl https://api.minimo.it/public/v1/templates/whatsapp/send \
-H "Authorization: Bearer YOUR_MINIMO_KEY" \
-H "Content-Type: application/json" \
-X POST \
-d '{
"recipient": "393391234567",
"type": "document",
"media": {
"providerMediaId": "1234567890123456",
"filename": "invoice.pdf"
}
}'
# Sticker (no caption, no filename)
curl https://api.minimo.it/public/v1/templates/whatsapp/send \
-H "Authorization: Bearer YOUR_MINIMO_KEY" \
-H "Content-Type: application/json" \
-X POST \
-d '{
"recipient": "393391234567",
"type": "sticker",
"media": { "link": "https://cdn.example.com/sticker.webp" }
}'
// Image by public URL, with a caption
await fetch('https://api.minimo.it/public/v1/templates/whatsapp/send', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_MINIMO_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
recipient: '393391234567',
type: 'image',
media: { link: 'https://cdn.example.com/welcome.jpg', caption: 'Welcome aboard!' },
}),
});
// Document by a pre-uploaded provider media id
await fetch('https://api.minimo.it/public/v1/templates/whatsapp/send', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_MINIMO_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
recipient: '393391234567',
type: 'document',
media: { providerMediaId: '1234567890123456', filename: 'invoice.pdf' },
}),
});
// Sticker (no caption, no filename)
await fetch('https://api.minimo.it/public/v1/templates/whatsapp/send', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_MINIMO_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
recipient: '393391234567',
type: 'sticker',
media: { link: 'https://cdn.example.com/sticker.webp' },
}),
});
import requests
URL = "https://api.minimo.it/public/v1/templates/whatsapp/send"
HEADERS = {"Authorization": "Bearer YOUR_MINIMO_KEY"}
# Image by public URL, with a caption
requests.post(URL, headers=HEADERS, json={
"recipient": "393391234567",
"type": "image",
"media": {"link": "https://cdn.example.com/welcome.jpg", "caption": "Welcome aboard!"},
})
# Document by a pre-uploaded provider media id
requests.post(URL, headers=HEADERS, json={
"recipient": "393391234567",
"type": "document",
"media": {"providerMediaId": "1234567890123456", "filename": "invoice.pdf"},
})
# Sticker (no caption, no filename)
requests.post(URL, headers=HEADERS, json={
"recipient": "393391234567",
"type": "sticker",
"media": {"link": "https://cdn.example.com/sticker.webp"},
})
Add quick-reply buttons
Atext message can carry up to 3 buttons (label up to 20 characters). When the contact taps one, the
whatsapp.message.received event carries
message.button = { id, title }, so your bot knows which one.
{
"recipient": "393391234567",
"type": "text",
"text": "Shall I book the call for tomorrow at 10:00?",
"buttons": [
{ "id": "confirm", "title": "Yes, book it" },
{ "id": "other_time", "title": "Another time" }
]
}
Choosing the sender (multi-number)
If the company has more than one connected number, setsender to the number you want to send
from — either the phone number (any formatting) or the Meta phone_number_id:
{
"recipient": "393391234567",
"type": "text",
"sender": "+393517654321",
"text": "Hi! How can I help?"
}
sender returns WHATSAPP_SENDER_NOT_FOUND. Source valid values from
List WhatsApp Senders.
Related
- Webhook Events: receive the messages you reply to
- List WhatsApp Senders
- List WhatsApp Templates
Authorizations
Body
text = a free-form message (only inside the 24-hour window opened by the contact's last message). template = an approved template. image, video, audio, document, sticker = a media message, with media (also only inside the 24-hour window).
text, template, image, video, audio, document, sticker "template"
Plain text message (used only if type is 'text')
"Hello, this is a plain text message."
Multi-sender: the connected WhatsApp number to send from, when the company has more than one. Accepts the phone number (E.164 or any formatting, e.g. +39 351 1234567) or the Meta phone_number_id. Omit to use the company preferred number. An unknown/foreign number returns WHATSAPP_SENDER_NOT_FOUND. List valid values via GET /public/v1/templates/whatsapp/senders.
"+393511234567"
Contact source recorded when the recipient does not exist yet and is created as a Minimo contact by this send (defaults to WhatsApp). Does not modify existing contacts. The contact source type is always system-defined and cannot be set by the caller.
64"WhatsApp"