PHP frameworkGuide · official SDK soon

Send SMS in Tunisia from Laravel with the built-in HTTP client.

Laravel's Http client handles authentication, timeouts and errors for you. Add your key to .env and send an SMS from a controller, a job or a notification. The official Laravel package is on its way.

What it does

  • Config in config/services.php and your .env file.
  • Send from a queued job so requests never slow down.
  • Idempotency-Key based on the order ID: a retried job never sends twice.
  • Clear exceptions with ->throw() on 4xx or 5xx errors.

Setup

  1. 1Add the sendimo key to config/services.php and SENDIMO_API_KEY to .env.
  2. 2Call the API with Http::withToken() from your code.
  3. 3Put sends in a job (ShouldQueue) for bulk sending.
  4. 4Receive statuses on a webhook route and update your models.
ConfigurationPHP
// config/services.php
'sendimo' => [
    'key' => env('SENDIMO_API_KEY'),
],

// .env
SENDIMO_API_KEY=sk_live_...
Send an SMSLaravel
use Illuminate\Support\Facades\Http;

$response = Http::withToken(config('services.sendimo.key'))
    ->withHeaders(['Idempotency-Key' => "order-{$order->id}-confirm"])
    ->timeout(10)
    ->post('https://api.sendimo.tn/v1/messages', [
        'to'        => $order->phone,
        'from'      => 'SENDIMO',
        'text'      => "Your order #{$order->id} is confirmed.",
        'reference' => "order-{$order->id}",
    ])
    ->throw(); // 4xx/5xx → RequestException

$messageId = $response->json('id'); // msg_01HF8Z3K9QX2
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.