Skip to content

Delete Session ​

DELETE /session

Log the Zate device out of your Telegram account and delete the session along with everything stored for it: account info, the login key, and webhook settings. After this, the old id and session-id no longer work.

This can't be undone

A deleted session can't be restored. To use Zate again, create a new session and scan the QR from scratch.

Endpoint Details ​

  • Base URL: https://api-zate.azickri.com
  • Headers: id and session-id

Headers ​

HeaderTypeRequiredDescription
idstringYesid from Create Session.
session-idstringYessessionId from Create Session.

Example Request ​

bash
curl -X DELETE "https://api-zate.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-zate.azickri.com/session', {
  headers: {
    'id': 'YOUR_ID',
    'session-id': 'YOUR_SESSION_ID',
  },
});

console.log(response.data);
javascript
const response = await fetch('https://api-zate.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"
}
FieldTypeDescription
idstringID of the deleted session.

Handled in the background

The response comes back right away, while logging out of Telegram and deleting the data happen in the background. So the Zate device may take a few seconds to disappear from Devices in Telegram.