English
Reset Session
PUT/sessionThe "start over" button for your session. This endpoint unlinks the currently connected device, clears the stored keys and contacts, and immediately prepares a new QR code. Your id and sessionId stay the same, so there's no configuration to change.
When would you use it? For example:
- The QR code never shows up.
- The session stopped and won't reconnect.
- You want to switch to a different WhatsApp number.
- Or you're just bored and think, "eh, let's reset it". 😅
You'll need to scan again
After a reset, your session isn't connected. Call Get Session to fetch the new QR code and scan it with your phone. The 3-minute rule applies again here too.
Endpoint Details
- Base URL:
https://api-zawa.azickri.com - Headers:
idandsession-id - Request body: none
Headers
| Header | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The id from Create Session. |
session-id | string | Yes | The sessionId from Create Session. |
Example Request
bash
curl -X PUT "https://api-zawa.azickri.com/session" \
-H "id: YOUR_ID" \
-H "session-id: YOUR_SESSION_ID"javascript
import axios from 'axios';
const response = await axios.put('https://api-zawa.azickri.com/session', null, {
headers: {
'id': 'YOUR_ID',
'session-id': 'YOUR_SESSION_ID',
},
});
console.log(response.data);javascript
const response = await fetch('https://api-zawa.azickri.com/session', {
method: 'PUT',
headers: {
'id': 'YOUR_ID',
'session-id': 'YOUR_SESSION_ID',
},
});
const data = await response.json();
console.log(data);Response
json
{
"id": "68b3f0a2c1d4e5f6a7b8c9d0"
}json
{
"statusCode": 400,
"message": "invalid header"
}json
{
"statusCode": 404,
"message": "session not found"
}| Field | Type | Description |
|---|---|---|
id | string | The ID of the session that was reset. |