Skip to main content
POST
/
api
/
sessions
/
{session}
/
restart
Restart the session
curl --request POST \
  --url https://{host}/api/sessions/{session}/restart \
  --header 'apikey: <api-key>'
{
  "success": true,
  "message": "Session restarted successfully",
  "session": "my-session"
}

Description

This endpoint restarts an existing WhatsApp session. It is useful for applying new configurations or resolving connection issues. The session will be stopped and started again with the provided configurations (or default configurations, if not provided).

URL Parameters

session
string
required
Unique session ID to be restarted

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 restarted successfully",
  "session": "my-session"
}

Status Codes

  • 200 - Session restarted successfully
  • 400 - Invalid parameters
  • 404 - Session not found

Usage Example

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

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 restart

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