WasenderApi - Low Cost WhatsApp API for Developers Create WhatsApp Session - API Documentation - WasenderApi - Low Cost WhatsApp API for Developers
WasenderApi API

API Documentation

WasenderApi WhatsApp API

Create WhatsApp Session

Sessions

POST/api/whatsapp-sessions

Creates a new WhatsApp session with the provided details. Requires an active subscription and is subject to session limits.

Create WhatsApp Session

Creates a new WhatsApp session with the provided details. Requires an active subscription and is subject to session limits.

This endpoint requires an access token to be included in the Authorization header. You can get the token from here.

Parameters

NameTypeRequiredDescription
namestringYesName of the WhatsApp session.
phone_numberstringYesPhone number in international format.
account_protectionbooleanYesEnable account protection features.
log_messagesbooleanYesEnable message logging.
webhook_urlstringNoURL for receiving webhook notifications.
webhook_enabledbooleanNoEnable webhook notifications.
webhook_eventsarrayNoArray of events to receive webhook notifications for.

Code Examples

curl -X POST "https://www.wasenderapi.com/api/whatsapp-sessions"
  -H "Authorization: Bearer YOUR_API_KEY"
  -H "Content-Type: application/json"
  -d '{
      "name": "Sample Name",
      "phone_number": "Sample Phone_number",
      "account_protection": true,
      "log_messages": true,
      "webhook_url": "Sample Webhook_url",
      "webhook_enabled": true,
      "webhook_events": [
          "number1",
          "number2"
      ]
  }'

Response Examples

{
    "success": true,
    "data": {
        "id": 1,
        "name": "Business WhatsApp",
        "phone_number": "+1234567890",
        "status": "connected",
        "account_protection": true,
        "log_messages": true,
        "webhook_url": "https://example.com/webhook",
        "webhook_enabled": true,
        "webhook_events": [
            "message",
            "group_update"
        ],
        "api_key": "75075a7bf6417bff59e76fb7205382c2dc74cf1769e76f382c2dc74cf176c0bf",
        "webhook_secret": "fb61be92ddb7935e0cedcec58e470f6c",
        "created_at": "2025-04-01T12:00:00Z",
        "updated_at": "2025-05-08T15:30:00Z"
    }
}