Send one message
Send one WhatsApp template, SMS, or email message to a contact, or create the contact in the same call with to.create: true.
| business_id | string |
| channel_id | string |
| channelrequired | string |
| torequired | object |
| template_id | string |
| template_variables | object |
- Business-initiated WhatsApp messages (outside the 24-hour customer-service window) must use an approved template; within 24 hours of the customer's last message a free-form
bodyis accepted instead oftemplate_id. - Pass business_id for managed-business scoping; pass channel_id when you need to send from a specific WhatsApp number.
- If channel_id is omitted for a WhatsApp template, Blueticked uses the number attached to that approved template.
- Use Idempotency-Key on write calls to avoid duplicate sends.
- The recipient is looked up in your contacts; one that is not there answers 404 not_found with
details.reason: "recipient_not_found". Passto.create: true(optionally withto.first_nameandto.last_name) to create the contact in the same call, exactly as POST /api/v1/contacts would: in the business you name, or your default business. It needs thecontacts:writescope too. The answer sayscontact_created, and carriescontact_idwhen the send created the contact or the key holdscontacts:read. - A contact created by a send triggers your contact-created flows and the contact.created webhook, like any new contact. It has given no consent, so a marketing send with
to.createis refused up front (details.reason: "consent_required") and nothing is written; record the opt-in with POST /api/v1/contacts first. The contact is created only after every other check passes (the channel, the body, the wallet, the plan's contact limit, which answers 403 plan_limit_reached), so a refused send leaves none behind; if the send fails after it (the send queue unavailable, say), the contact stays. - Authorize WhatsApp sends with either
messages:sendor the least-privilegewhatsapp:sendscope.
curl -X POST "https://app.blueticked.com/api/v1/messages" \
-H "Authorization: Bearer $BLUETICKED_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: change-me-per-request-0001" \
-d '{
"business_id": "22222222-2222-4222-9222-222222222222",
"channel_id": "11111111-1111-4111-9111-111111111111",
"channel": "whatsapp",
"to": {
"phone": "+27800000001"
},
"template_id": "1f2f3f4f-0000-4000-9000-abcdef123456",
"template_variables": {
"1": "Sam",
"2": "#1001"
}
}'{
"message_id": "763c4dc3-d46b-4c10-8bd4-3f233a933ea0",
"conversation_message_id": "5592edf6-d7ae-4198-962e-3e8ebe83bb49",
"conversation_id": "fa3efd47-67b2-428c-b75f-17d1dd2e9790",
"status": "queued",
"contact_id": "ff506e53-e2f0-4d92-884a-dab77d628bad",
"contact_created": false,
"request_id": "req_b2e3d610e10f1b07468721ee98f0e1d2"
}