Get started
Quickstart
Send your first SMS with the Labyrinthe Connect API in minutes: test key, HTTP call or official package.
The Labyrinthe Connect API sends SMS and verifies phone numbers with OTP codes, from your server. It is a JSON REST API: one API key, one HTTPS request, one JSON response. Official packages exist for PHP, Laravel, Node.js, Python, .NET, Java and WordPress.
1. Create a test key#
- Create an account, then open Developers > API keys in the client area.
- Create a test key: it starts with
lsk_test_. Copy it, it will not be shown again. - Keep it server-side (
LABYRINTHE_API_KEYenvironment variable), never in a mobile app or a browser.
With a lsk_test_… key, nothing is sent and no credit is used: responses have the same shape as in production. See Test mode.
2. Install a package (optional)#
Packages handle authentication, retries, idempotency, pagination, typed errors and webhook verification. You can also call the API directly over HTTP.
Installation
composer require labyrinthe/connect-php3. Send a first SMS#
Base URL: https://api.labyrinthe-rdc.com/api/public/v1. Sending is asynchronous: the 202 response confirms queuing and debit, not delivery.
Over HTTP#
curl -X POST "https://api.labyrinthe-rdc.com/api/public/v1/sms" \
-H "Authorization: Bearer lsk_test_xxxxxxxxxxxxxxxx" \
-H "Idempotency-Key: order-1042-ready" \
-H "Content-Type: application/json" \
-d '{"recipient":"243812345678","body":"Votre commande 1042 est prête.","reference":"CMD-1042"}'With the packages#
<?php
use Labyrinthe\Connect\Client;
$client = new Client('lsk_test_xxxxxxxxxxxxxxxx'); // or Client::fromEnv() (LABYRINTHE_API_KEY)
$message = $client->sms->send(
to: '243812345678',
body: 'Votre commande 1042 est prête.',
reference: 'CMD-1042',
idempotencyKey: 'order-1042-ready', // replaying within 24 h sends nothing again
);
echo $message->id, ' ', $message->status->value; // queuedResponse#
{
"data": [
{
"id": "9d5c0a3e-6f0b-4c2e-9a51-3b7f2d8e4c10",
"reference": "CMD-1042",
"recipient": "243812345678",
"sender": "LabConnect",
"encoding": "ucs2",
"status": "queued",
"segments": 1,
"credits_charged": 1,
"campaign_id": null,
"provider_message_id": null,
"error_code": null,
"error_message": null,
"created_at": "2026-11-06T09:39:11+00:00",
"submitted_at": null,
"delivered_at": null
}
]
}