Your Channels

Each channel is an independent WhatsApp connection with its own API key.

No channels yet

Create your first channel to connect a WhatsApp number and get an API key.

W

Connect this channel to start sending and receiving WhatsApp messages.

API Key

Pass as X-API-Key header in all requests to this channel.

Send a message

International format — no + or spaces

cURL example


          

Message Log

TimeDirFromToMessageType
No messages yet

Add Webhook

Active Webhooks

No webhooks configured

Payload Example

{
  "event": "message",
  "channel_id": "your-channel-id",
  "timestamp": 1714000000000,
  "data": {
    "direction": "in",
    "from_number": "4917612345678",
    "to_number": "4930123456789",
    "body": "Hello!",
    "type": "chat"
  }
}

API Reference

Base URL: https://wapi.strehldigital.com/api

Authentication

All API requests require an API key that identifies your channel. Pass it as an HTTP header or query parameter.

Header (recommended)
X-API-Key: wapi_xxxxxxxxxxxx
Query parameter
GET /api/status?api_key=wapi_xxxxxxxxxxxx

Send Message

POST /api/messages/send

Send a WhatsApp text message to any number.

Body paramTypeRequiredDescription
numberstringYesRecipient in international format (no +)
messagestringYesText content to send
Request
curl -X POST https://wapi.strehldigital.com/api/messages/send \
  -H "X-API-Key: wapi_xxxx" \
  -H "Content-Type: application/json" \
  -d '{"number": "4917612345678", "message": "Hello from WAPI!"}'
Response 200
{ "success": true, "messageId": "3EB0..." }

Get Messages

GET /api/messages

Retrieve message history for this channel.

Query paramDefaultDescription
limit50Max messages to return (max 100)
offset0Pagination offset
numberFilter by phone number
Request
curl https://wapi.strehldigital.com/api/messages?limit=20 \
  -H "X-API-Key: wapi_xxxx"
Response 200
{
  "messages": [
    {
      "id": "...",
      "direction": "in",
      "from_number": "4917612345678",
      "to_number": "4930123456789",
      "body": "Hello!",
      "type": "chat",
      "timestamp": 1714000000
    }
  ],
  "total": 42,
  "limit": 20,
  "offset": 0
}

List Contacts

GET /api/contacts

Returns up to 500 contacts from your WhatsApp address book.

Response 200
{ "contacts": [{ "number": "4917612345678", "name": "Max Mustermann" }] }

List Chats

GET /api/contacts/chats

Returns up to 100 open chats with the last message and unread count.

Webhooks

GET /api/webhooks
POST /api/webhooks
DELETE /api/webhooks/:id

Register a URL to receive real-time events when messages arrive.

Create webhook
curl -X POST https://wapi.strehldigital.com/api/webhooks \
  -H "X-API-Key: wapi_xxxx" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://your-app.com/hook", "events": "message", "secret": "optional-secret"}'
Incoming webhook payload
{
  "event": "message",
  "channel_id": "...",
  "timestamp": 1714000000000,
  "data": {
    "direction": "in",
    "from_number": "4917612345678",
    "to_number": "4930123456789",
    "body": "Hello!",
    "type": "chat",
    "timestamp": 1714000000
  }
}

Channel Status

GET /api/status

Check the connection status of your channel.

Response 200 (connected)
{
  "status": "ready",
  "info": { "number": "4930123456789", "name": "My Bot", "platform": "smba" },
  "channel": { "id": "...", "name": "My Channel" }
}