English
Delete Session
DELETE/sessionSay goodbye to your session. This endpoint logs the linked device out of your phone and deletes everything tied to that session from the server: session info, device keys, and the synced address book.
Use it when you no longer need the session, or if your id and session-id have accidentally leaked.
This can't be undone
Once deleted, that id and session-id can't be used again and will return 404 session not found. To use Zawa again, just create a new session.
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 DELETE "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.delete('https://api-zawa.azickri.com/session', {
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: 'DELETE',
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 deleted session. |
The logout and cleanup run in the background, so the response comes back right away without waiting. Within a few seconds, the device disappears from the Linked devices list on your phone.