Sendable Docs

Session Management

Manage WhatsApp sessions with clear operational controls.

Session Lifecycle

Creating a Session

  1. Go to Dashboard
  2. Click "New Session"
  3. Name your session (e.g., "Production", "Support Team")
  4. Scan the QR code with WhatsApp
  5. Wait for "Connected" status

Connection States

StatusDescriptionActions
connectingInitial connection in progressWait or check QR code
connectedSession is active and readySend/receive messages
disconnectedSession lost connectionCheck phone connectivity
expiredQR code expiredGenerate new QR code

Reconnecting

If your session disconnects:

  1. Go to your session page
  2. Click "Reconnect"
  3. Scan the new QR code
  4. Verify connection status

Stopping a Session

To temporarily pause a session:

  1. Go to session settings
  2. Click "Stop Session"
  3. The session will enter "disconnected" state
  4. Reconnect anytime to resume

Deleting a Session

To permanently remove a session:

  1. Go to session settings
  2. Click "Delete Session"
  3. Confirm deletion
  4. All associated API keys will be revoked

Session Health

Monitor your session health in the dashboard:

  • Connection Status: Green = healthy, Red = disconnected
  • Last Activity: Time of last message sent/received
  • Message Queue: Pending messages waiting to be sent

Health Check API

curl -X GET "https://api.sendable.dev/sessions/{sessionId}/status" \
  -H "x-api-key: YOUR_API_KEY"

Response:

{
  "sessionId": "sess_xyz789",
  "status": "connected",
  "connectedAt": "2026-03-02T10:30:00Z",
  "health": "healthy",
  "metrics": {
    "messagesSent": 1250,
    "messagesReceived": 890,
    "uptime": 99.9
  }
}

Multi-Session Strategy

Separate by Use Case

Create separate sessions for different purposes:

  • Marketing: Bulk messaging campaigns
  • Support: Customer service conversations
  • Notifications: OTPs and alerts

Separate by Region

For international businesses:

  • US/EU: Session with US phone number
  • Asia: Session with Asian phone number
  • LatAm: Session with Latin American number

Operational Notes

Keep Connection Healthy

  • Keep WhatsApp mobile app active
  • Ensure phone has stable internet
  • Don't log out of WhatsApp on your phone
  • Avoid switching phones frequently

Handle Disconnections

Set up webhook to monitor disconnections:

app.post('/webhook', (req, res) => {
  const { type, data } = req.body
  
  if (type === 'session.socket-disconnected') {
    // Alert your team
    sendAlert(`Session ${data.sessionId} disconnected`)
  }
  
  res.sendStatus(200)
})

API Key Scoping

Each session has its own API keys:

  • Keys from Session A cannot access Session B
  • Revoking a session revokes all its keys
  • Different sessions can have different rate limits

On this page