Skip to main content
POST
/
api
/
sessions
/
{session}
/
start
Start the session
curl --request POST \
  --url https://{host}/api/sessions/{session}/start \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '{}'
{
  "success": true,
  "message": "Session started successfully",
  "session": "my-session"
}

Description

This endpoint initializes a new WhatsApp session. After starting the session, you will need to authenticate it using the QR Code or pairing code. You can provide custom configurations for the session storage and logs.

URL Parameters

session
string
required
Unique session ID to be started

Body

{
  "config": {
    "store": {
      "dialect": "sqlite3",
      "address": "/app/data/whatsmeow.db"
    },
    "log": {
      "level": "INFO"
    }
  }
}

Body Parameters

PropertyTypeRequiredDescription
configobject❌ NoOptional session configurations
config.storeobject❌ NoSession storage configurations
config.store.dialectstring❌ NoDatabase type (default: “sqlite3”)
config.store.addressstring❌ NoDatabase file path (default: “/app/data/whatsmeow.db”)
config.logobject❌ NoSession log configurations
config.log.levelstring❌ NoLog level: “DEBUG”, “INFO”, “WARN”, “ERROR” (default: “INFO”)
{
  "success": true,
  "message": "Session started successfully",
  "session": "my-session"
}

Status Codes

  • 200 - Session started successfully
  • 400 - Invalid parameters
  • 409 - Session already exists and is active

Usage Example

curl -X POST https://api.wappfy.com.br/api/sessions/my-session/start \
  -H "Content-Type: application/json" \
  -d '{
    "config": {
      "store": {
        "dialect": "sqlite3",
        "address": "/app/data/whatsmeow.db"
      },
      "log": {
        "level": "INFO"
      }
    }
  }'

Authorizations

apikey
string
header
required

Your Wappfy API key (get it at dash.wappfy.com.br)

Path Parameters

session
string
required

The session name (instanceName) you want to start

Body

application/json · object

Response

201 - application/json
name
string
required

Session name (instanceName)

Example:

"my-session"

status
enum<string>
required
Available options:
STOPPED,
STARTING,
SCAN_QR_CODE,
WORKING,
FAILED
config
object
I