M

One API, Eight Languages: Sending SMS, MMS, and Email with the CloudContactAI SDKs

by ccai_admin | Sep 25, 2026 | How to, SMS, Technology

Most of the messages that move through CloudContactAI don’t start with someone clicking “Send Campaign” in the dashboard; they start in a line of code. Whether you’re triggering a payment reminder from your billing system, firing off a shipping notification from your e-commerce backend, or building AI agent tools that send messages on your behalf, our SDKs are built to make that a few lines of code, not a few days of integration work.

We maintain official SDKs in Node.js, Python, Java/Kotlin, Go, Ruby, PHP, Perl, and C#/.NET, and every one of them supports the same core capabilities: SMS, MMS, Email, and real-time webhooks. Here’s what that looks like in practice.

Send an SMS in One Call

No matter which language your stack runs on, sending a message looks basically the same: construct a client with your credentials, call send.

Node.js

import { CCAI } from 'ccai-node';

const ccai = new CCAI({ clientId: 'YOUR-CLIENT-ID', apiKey: 'API-KEY-TOKEN' });

ccai.sms.sendSingle(
  "Jane", "Smith", "+15559876543",
  "Hi ${firstName}, thanks for your interest!",
  "Single Message Test"
);

Python

from ccai_python import CCAI

ccai = CCAI(client_id="YOUR-CLIENT-ID", api_key="YOUR-API-KEY")

response = ccai.sms.send_single(
    first_name="John", last_name="Doe", phone="+15551234567",
    message="Hello ${first_name}!", title="Test Campaign"
)

Go

response, err := client.SMS.SendSingle(ctx, &ccai.SMSRequest{
    FirstName: "John", LastName: "Doe", Phone: "+15551234567",
    Message: "Hello ${first_name}!",
})

Template variables like ${firstName} are filled in per-contact automatically, the same personalization you’d get building a campaign in the dashboard, available from your own codebase. Full details for every language: Sending and Receiving Messages.

MMS Is the Same Call, Plus an Image

Attaching a photo (a payment statement, a product shot, a visual instruction sheet) doesn’t require a separate upload step. In Node.js, for example, one call handles both the upload and the send:

ccai.mms.sendWithImage(
  imagePath, contentType, [account],
  "Here's your receipt from today's visit", "Receipt MMS"
);

Email Without Standing Up Your Own Infrastructure

The same SDKs send email through your connected Amazon SES or Twilio SendGrid account: no separate email service to integrate, and the same contact/template model you already use for SMS:

ccai.email.send(accounts, "Your order has shipped!", htmlBody, {
  senderEmail: "[email protected]",
  senderName: "Your Company",
});

More on setup and deliverability: Sending Email.

Webhooks: Know the Moment Something Happens

Sending is half the story: webhooks tell your system the moment a message is delivered, replied to, or bounced, without polling. Every SDK covers the same five event types: message.sent, message.received, message.excluded, message.error.carrier, and message.error.cloudcontact.

Perl’s SDK handles this particularly cleanly, with a single callback dispatching every event type:

$ccai->webhook->handle_event($json, sub {
    my ($event_type, $data) = @_;
    if ($event_type eq 'message.sent') {
        print "Message delivered to $data->{To}\n";
    }
});

And if you’re on .NET, our docs walk through the full local-testing loop with ngrok and an ASP.NET Core controller, end to end. Start here: Webhooks.

Pick Your Language

Language Install Docs GitHub
Node.js npm install ccai-node Node.js guide ccai-node
Python pip install ccai-python Python guide ccai-python
Java / Kotlin com.cloudcontactai:ccai-java-sdk (Maven) Java guide · Kotlin guide ccai-java
Go go get github.com/cloudcontactai/ccai-go Go guide ccai-go
Ruby gem install ccai Ruby guide ccai-ruby
PHP composer require cloudcontactai/ccai-php PHP guide ccai-php
Perl cpanm --installdeps . Perl guide ccai-perl
C# / .NET dotnet add package CloudContactAI.CCAI.NET .NET guide CCAI.NET

Ruby also ships a standalone CLI, so you can send a message straight from a terminal or a shell script without writing any code:

ccai --client-id YOUR-CLIENT-ID --message "Your appointment is tomorrow" --image path/to/img.jpg

Get Your API Key and Send Your First Message

Every SDK uses the same Client ID and API Key, generated once from your dashboard. From there, sending your first SMS, MMS, or email takes minutes, not a sprint.

Create your API key and send your first message →

Building something interesting with the API? We’d love to hear about it, reach out to your account team.

CloudContactAI
Now available on iOS
Get App