Developers
Connect your own systems to Codelia SMS.
Send SMS from your code or your AI assistant, and get signed webhooks and delivery receipts back.
Live today
Send SMS from your code
Create an API key in the portal and send with one request. Get an estimate before you send, and add an idempotency key so a retried request doesn't send twice.
curl -X POST "https://api.sms.codelia.studio/v1/organizations/$CODELIA_ACCOUNT_ID/messages" \
-H "Authorization: Bearer $CODELIA_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: reminder-maria-1000" \
-d '{
"to": [
"+442079460123"
],
"from": "SeaviewDent",
"body": "Hi Maria, see you tomorrow at 10:00."
}'Send SMS from your AI assistant
Connect your AI assistant with a Codelia SMS sign-in or an API key. It can quote, send and schedule messages, and manage your contacts and lists.
https://api.sms.codelia.studio/v1/mcp{
"mcpServers": {
"codelia-sms": {
"url": "https://api.sms.codelia.studio/v1/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}Signed webhooks
Every event is signed, so you can check it came from us.
Add an endpoint in the portal and choose the events it gets: message.delivered, message.failed, campaign.completed, campaign.partial_failure and campaign.failed.
If a delivery fails, we try twice more within a few seconds. Every delivery is logged, and you can replay a finished one from its endpoint's recent deliveries in the portal.


{
"id": "evt_5f0c2a9e-7b1d-5c3e-9a44-2d6b8e1f0c37",
"version": "2026-07-30",
"type": "message.delivered",
"created": "2026-11-26T19:32:32.957Z",
"data": {
"messageId": "8c1f7a52-3d9b-4e0a-b6f1-2a7c5e9d4b10",
"direction": "outbound",
"status": "delivered",
"recipient": "+442079460123",
"sender": "SeaviewDent",
"segments": 1,
"priceMicros": 38000,
"currency": "EUR",
"countryCode": "GB",
"errorCode": null,
"errorDescription": null,
"sentAt": "2026-11-26T19:32:28.957Z",
"deliveredAt": "2026-11-26T19:32:31.957Z"
}
}import { createHmac, timingSafeEqual } from "node:crypto";
// header: the request's X-Codelia-Signature
// rawBody: the request body, exactly as received
export function isFromCodelia(header, rawBody, secret) {
const { t, v1 } = Object.fromEntries(
header.split(",").map((part) => part.split("=")),
);
const expected = createHmac("sha256", secret)
.update(`${t}.${rawBody}`)
.digest("hex");
const recent = Math.abs(Date.now() / 1000 - Number(t)) <= 300;
return (
recent &&
expected.length === v1?.length &&
timingSafeEqual(Buffer.from(expected), Buffer.from(v1))
);
}Delivery receipts
Each message records when it was sent and when the phone confirmed it arrived, and message.delivered or message.failed tells your endpoint.

