LanguageGuide · official SDK soon

Send SMS in Tunisia from Java, with no dependency.

The java.net.http client that ships with the JDK is all you need to call the Sendimo API. Nothing to add to Maven or Gradle. The official Java SDK is on its way.

What it does

  • Only the JDK (Java 17 or newer for text blocks).
  • Configurable timeouts on every request.
  • JSON responses that are easy to read with Jackson or Gson.
  • Works in any JVM app: Jakarta EE, Quarkus, Micronaut…

Setup

  1. 1Use Java 17 or newer.
  2. 2Put your API key in the SENDIMO_API_KEY environment variable.
  3. 3POST to /v1/messages with HttpClient.
  4. 4Receive delivery statuses by webhook.
Send an SMSJava
// Java 17+ (java.net.http, no dependency)
HttpClient client = HttpClient.newHttpClient();

String body = """
    {
      "to": "+21620123456",
      "from": "SENDIMO",
      "text": "Your code is 482913. It expires in 5 minutes.",
      "reference": "order-4821"
    }
    """;

HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.sendimo.tn/v1/messages"))
    .header("Authorization", "Bearer " + System.getenv("SENDIMO_API_KEY"))
    .header("Content-Type", "application/json")
    .header("Idempotency-Key", "order-4821-otp")
    .timeout(Duration.ofSeconds(10))
    .POST(HttpRequest.BodyPublishers.ofString(body))
    .build();

HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode()); // 202
System.out.println(response.body());       // {"id":"msg_01HF8Z3K9QX2","status":"queued",...}
Response 202 AcceptedJSON
{
  "id": "msg_01HF8Z3K9QX2",
  "status": "queued",
  "to": "+21620123456",
  "from": "SENDIMO",
  "text": "Your code is 482913. It expires in 5 minutes.",
  "encoding": "GSM-7",
  "segments": 1,
  "network": "ooredoo",
  "cost": { "amount": "0.140", "currency": "TND" },
  "reference": "order-4821",
  "scheduled_at": null,
  "created_at": "2026-10-30T09:15:00Z"
}

Next steps

Other integrations

Ready to send your SMS?

Launching soon in Tunisia. Join early access.