Sent SDKs

Build messaging into your application in minutes. The official Sent LogoSent SDKs provide idiomatic, type-safe clients for every major language — with automatic retries, webhook signature verification, and intelligent error handling built in.

New to Sent? Start with the Quickstart Guide to set up your account and send your first message.

Prerequisites

Before using any SDK, you'll need:

  1. A Sent account - Sign up at app.sent.dm
  2. An API key - Get yours from the Sent Dashboard
  3. A template - Create a message template in the dashboard (WhatsApp templates require approval)

Environment Variable: All SDKs use SENT_DM_API_KEY for authentication. Set this in your environment before running your application.

Why Use the SDKs?

Type Safety

Full type definitions for TypeScript, Python, Go, Java, C#, PHP, and Ruby. Catch errors at compile time.

Smart Retries

Automatic exponential backoff for rate limits and transient failures. Configurable retry policies.

Webhook Security

Built-in signature verification to ensure webhook events are authentic and untampered.

Zero Dependencies

Most SDKs have zero external dependencies. Just install and start sending messages.

Official SDKs

Quick Comparison

See how simple it is to send a message in each language:

import SentDm from '@sentdm/sentdm';

const client = new SentDm();  // Uses SENT_DM_API_KEY env var

const response = await client.messages.send({
  to: ['+1234567890'],
  template: {
    id: 'your-template-id',
    name: 'welcome'
  },
  // testMode: true, // Uncomment to test without sending
});

console.log(`Sent: ${response.data.messages[0].id}`);
from sent_dm import SentDm

client = SentDm()  # Uses SENT_DM_API_KEY env var

response = client.messages.send(
    to=["+1234567890"],
    template={
        "id": "your-template-id",
        "name": "welcome"
    },
    # test_mode=True,  # Uncomment to test without sending
)

print(f"Sent: {response.data.messages[0].id}")
import (
    "github.com/sentdm/sent-dm-go"
    "github.com/sentdm/sent-dm-go/option"
)

client := sentdm.NewClient()  // Uses SENT_DM_API_KEY env var

err := client.Messages.Send(ctx, sentdm.MessageSendParams{
    To: []string{"+1234567890"},
    Template: sentdm.MessageSendParamsTemplate{
        ID: sentdm.String("your-template-id"),
    },
    // TestMode: sentdm.Bool(true), // Uncomment to test without sending
})
import dm.sent.client.SentDmClient;
import dm.sent.client.okhttp.SentDmOkHttpClient;
import dm.sent.models.messages.MessageSendParams;

SentDmClient client = SentDmOkHttpClient.fromEnv();

MessageSendParams params = MessageSendParams.builder()
    .addTo("+1234567890")
    .template(MessageSendParams.Template.builder()
        .id("your-template-id")
        .build())
    // .testMode(true) // Uncomment to test without sending
    .build();

var response = client.messages().send(params);
System.out.println("Sent: " + response.data().messages().get(0).id());
using Sentdm;

SentDmClient client = new();  // Uses SENT_DM_API_KEY env var

var response = await client.Messages.SendAsync(new MessageSendParams
{
    To = new List<string> { "+1234567890" },
    Template = new MessageSendParamsTemplate
    {
        ID = "your-template-id"
    },
    // TestMode = true, // Uncomment to test without sending
});

Console.WriteLine($"Sent: {response.Data.Messages[0].Id}");
use SentDM\Client;

$client = new Client($_ENV['SENT_DM_API_KEY']);

$response = $client->messages->send(
    to: ['+1234567890'],
    template: [
        'id' => 'your-template-id',
        'name' => 'welcome'
    ],
    // testMode: true, // Uncomment to test without sending
);

echo "Sent: {$response->data->messages[0]->id}\n";
require "sentdm"

sent_dm = Sentdm::Client.new  # Uses SENT_DM_API_KEY env var

response = sent_dm.messages.send(
  to: ['+1234567890'],
  template: {
    id: 'your-template-id',
    name: 'welcome'
  },
  # test_mode: true, # Uncomment to test without sending
)

puts "Sent: #{response.data.messages[0].id}"

Note: Each SDK follows its language's conventions. Method names, parameter styles, and error handling vary by language. See the individual SDK pages for detailed documentation.

Testing: Use test_mode: true (or test_mode=True in Python) in development to validate requests without sending real messages. The API will validate your request but not actually send any messages.

SDK Versions

LanguagePackageCurrent VersionChangelog
TypeScript@sentdm/sentdm0.8.0GitHub Releases
Pythonsentdm0.8.0GitHub Releases
Gogithub.com/sentdm/sent-dm-go0.7.0GitHub Releases
Javadm.sent:sent-dm-java0.6.0GitHub Releases
C#Sentdm0.7.0GitHub Releases
PHPsentdm/sent-dm-php0.6.0GitHub Releases
Rubysentdm0.3.0GitHub Releases

Framework Quickstarts

Get up and running quickly with popular frameworks:

Installation

All SDKs are available through standard package managers:

npm install @sentdm/sentdm
pip install sentdm
go get github.com/sentdm/sent-dm-go
<dependency>
  <groupId>dm.sent</groupId>
  <artifactId>sent-dm-java</artifactId>
  <version>0.6.0</version>
</dependency>
dotnet add package Sentdm
composer require sentdm/sent-dm-php
gem install sentdm

Open Source

All Sent SDKs are open source and available on GitHub:

Contributions welcome! Found a bug or want to add a feature? We accept pull requests on all SDK repositories.

On this page