Skip to main content
POST
/
api
/
instance
/
reconnect
/
:instance
Reconnect Instance
curl --request POST \
  --url https://api.example.com/api/instance/reconnect/:instance \
  --header 'token: <token>'

Documentation Index

Fetch the complete documentation index at: https://docs.ryzeapi.cloud/llms.txt

Use this file to discover all available pages before exploring further.

Auth: TokenAccount or TokenInstanceRate-limit: Global (100/min) • Idempotent: partial

Description

Reuses the whatsmeow session already stored to re-establish the connection without a new QR/pairing. Works if the instance has been connected at least once (session saved in whatsmeow_device).

Example

curl -X POST "https://ryzeapi.cloud/api/instance/reconnect/my-instance" \
  -H "token: $Token_Instance"

Success response

200 OK
{
  "success": true,
  "message": "Reconnect initiated",
  "status": "connecting"
}
After the call, poll GET /api/instance/list?instanceName=<name> to detect when the state becomes connected. The instance.state event is also emitted via webhook/WebSocket.

Path parameters

instance
string
required
Instance name.

Headers

token
string
required
TokenAccount or TokenInstance.
Body is accepted but ignored, you can send it empty.

Errors

HTTPerror.messageWhen
400Instance has no saved session — call /connect firstNo session to reuse (instance never connected or was logged out).
401Invalid tokenToken missing or invalid.
404Instance not foundName does not exist.
429Rate limit exceeded. Try again later.More than 100 req/min.
500Failed to reconnect: <reason>Failure in Connect() (network, proxy, DNS).
{
  "success": false,
  "error": {
    "message": "Instance has no saved session — call /connect first"
  }
}

Notes

Difference from connect: connect always (re)creates a new client and generates QR/pairing. reconnect reuses an existing session, does not work if the instance has never connected or was logged out from the phone side.
If WhatsApp logged out the device (loggedout state), reconnect fails with 400. Use connect to generate a new QR.

Next

Connect (QR/pairing)

To reconnect when the session has been lost.

Logout

Logs the device out of WhatsApp while keeping the instance.