SMS
SMS quickstart
Send your first Canadian SMS in under 5 minutes.
Authentication, API keys, webhook setup and signatures, rate limits, the SDK, the MCP server and the general error codes are on the Platform page.
Quickstart
- Create a free account, then open API Keys → Create key in the dashboard. The full key is shown once, right after you create it, so copy it then.
- Start with a test key: it works immediately, before any top-up, so you can send test messages and explore the API for free.
- Top up your balance with a card via Stripe. Live keys return 402 PAYMENT_REQUIRED until the first top-up.
- Verify your phone number as the account owner. A live send needs a verified owner phone.
- Buy a Canadian number to send from; a live send needs a number your account owns.
- Record CASL consent for each phone number you will message.
- Send your first message using the REST API.
Send your first message
With a key, a number and consent in place, one call sends the SMS. The Node.js SDK and the REST API take the same fields.
import { Honkio } from '@honkio/node'
const honkio = new Honkio(process.env.HONKIO_API_KEY)
// "from" is one of your HonkIO numbers; "to" is a real number you hold consent for
const { data, error } = await honkio.messages.send({
from: '+1416XXXXXXX',
to: '+1613XXXXXXX',
body: 'Hello from HonkIO! 🇨🇦',
})
if (error) throw new Error(`${error.name}: ${error.message}`)
console.log(data.id, data.status)import os
from honkio import Honkio
client = Honkio(os.environ["HONKIO_API_KEY"])
# "from_" is one of your HonkIO numbers; "to" is a real number you hold consent for
message = client.messages.send(
from_="+1416XXXXXXX",
to="+1613XXXXXXX",
body="Hello from HonkIO! 🇨🇦",
)
print(message["id"], message["status"])<?php
use Honkio\Honkio;
$honkio = new Honkio(getenv('HONKIO_API_KEY'));
// "from" is one of your HonkIO numbers; "to" is a real number you hold consent for
$message = $honkio->messages->send([
'from' => '+1416XXXXXXX',
'to' => '+1613XXXXXXX',
'body' => 'Hello from HonkIO! 🇨🇦',
]);
echo $message['id'], ' ', $message['status'], "\n";# "from" is one of your HonkIO numbers; "to" is a real number you hold consent for
curl -X POST https://api.honkio.ca/v1/messages \
-H "Authorization: Bearer mk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "+1416XXXXXXX",
"to": "+1613XXXXXXX",
"body": "Hello from HonkIO! 🇨🇦"
}'See the SDK reference for a typed client with every resource and webhook verification.
HonkIO