Linekit Communications Infrastructure
Linekit provides one unified REST API, SDK suite, and webhook engine for provisioning phone numbers, connecting WhatsApp and Telegram, and delivering programmatic customer communications.
Send your first WhatsApp message
Create a project, connect a WhatsApp number, generate a scoped API key, and send a message via POST /v1/messages.
curl -X POST https://api.linekit.dev/v1/messages \
-H "Authorization: Bearer lk_live_your_api_key" \
-H "Idempotency-Key: order-4821" \
-H "Content-Type: application/json" \
-d '{
"from": "+14155550100",
"to": "+2348012345678",
"channel": "whatsapp",
"type": "text",
"text": "Hello from Linekit"
}'Authentication
Include Authorization: Bearer lk_test_... or lk_live_... on every request to https://api.linekit.dev/v1.
Projects & API Keys
Projects isolate environments (test vs live), scopes (e.g. messages:write, webhooks:read), and resources. Keys are SHA-256 hashed and shown once at creation or rotation.
Phone Numbers (Purchase & BYON OTP)
Search available numbers with GET /v1/numbers/available and provision dedicated numbers via POST /v1/numbers (ready immediately for inbound/outbound SMS, MMS, and HD Voice calling—no SMS connection setup required). Bring an existing number via OTP verification using POST /v1/numbers/byon/start and POST /v1/numbers/byon/verify, then link WhatsApp or Telegram on any project number via POST /v1/numbers/:id/channels. Adjust call forwarding, CNAM, and recording settings anytime via PATCH /v1/numbers/:id/voice.
Programmable eSIMs
Order GSMA SGP.22 eSIM profiles in one request with POST /v1/esims, returning the SM-DP+ LPA activation string, data cap alerts, and (when enable_voice and enable_sms are enabled) an active mobile MSISDN bound to your project's SMS and Call Control webhook stack. Retrieve live telemetry and activation QR payloads via GET /v1/esims/:id.
Programmable Voice & Calls
Initiate outbound calls with POST /v1/calls and control active calls via POST /v1/calls/:id/answer, POST /v1/calls/:id/speak, and POST /v1/calls/:id/hangup (requires calls:read / calls:write). Lifecycle webhooks emit call.initiated, call.answered, and call.ended events.
curl -X POST https://api.linekit.dev/v1/calls \
-H "Authorization: Bearer lk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"from": "+14155550100",
"to": "+14155550199"
}'WhatsApp Integration
Use mode: "cloud_api" for Official Meta WhatsApp Business Platform (recommended for templates, SLAs, and compliance), or mode: "web_session" for isolated session runners.
Telegram Integration
Create a Telegram connection with channel: "telegram" and mode: "bot_api" using the same messaging and webhook endpoints.
Connections Lifecycle
Connections transition through pending, initializing, awaiting_authentication, connected, reconnecting, and disconnected managed by Linekit's orchestration engine.
Sending Messages
Send via POST /v1/messages (passing from and channel) or POST /v1/numbers/:id/messages. Set channel: "all" to fan out across all configured channels on that number, and supply an Idempotency-Key header to prevent duplicate sends.
Receiving Messages
Inbound messages are normalized into message.received events regardless of provider format.
Webhooks & Signatures
Each project supports one webhook endpoint and signing secret per environment (test and live), managed via GET/PUT/DELETE /v1/webhook, POST /v1/webhook/rotate-secret, POST /v1/webhook/test, GET /v1/webhook/deliveries, and POST /v1/webhook/replay. Every webhook includes X-Linekit-Signature: t=<unix>,v1=<hmac>; verify the HMAC-SHA256 digest of ${t}.${rawBody} before processing.
{
"id": "evt_123",
"type": "message.received",
"created_at": "2026-11-18T10:00:00Z",
"data": {
"message_id": "msg_123",
"phone_number_id": "num_123",
"channel": "whatsapp",
"direction": "inbound",
"from": "+234XXXXXXXXXX",
"to": "+14155550100",
"type": "text",
"text": "Hello!"
}
}Message Types
Supports text, image, video, audio, document, and WhatsApp template messages. Unsupported types per channel return 400 unsupported_message_type.
Error Handling
All API errors return JSON { "error": { "code", "message", "request_id" } } with standard HTTP codes (400, 401, 403, 404, 429).
Rate Limits
Requests are rate-limited per project (120 req/min in test, 600 req/min in live). Inspect X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers.
Usage & Billing
Query GET /v1/usage and GET /v1/billing/invoices for auditable organization billing and usage summaries.
SDKs (TypeScript & Python)
Install @linekit/sdk in TypeScript/Node/Workers or use httpx / OpenAPI codegen in Python.
API Reference & Postman
Import https://api.linekit.dev/v1/openapi.json directly into Postman or Insomnia to generate a ready-to-use collection for /projects, /numbers, /esims, /calls, /connections, /messages, /webhook, /usage, and /billing.
Troubleshooting
If a webhook enters dead_letter, verify TLS and non-private DNS resolution, then replay via POST /v1/webhook/replay.