Skip to content
Whats91

Extend an active session lease without changing its session UID.

Renew Session

Summary

Extend an active session lease without changing its session UID.

Prerequisites

  • Authorization: Bearer w91_live_xxx
  • Content-Type: application/json for JSON requests
POST/api/v2/custom-boards/sessions/{sessionUid}/renew

Extend an active session lease.

ParameterTypeRequiredDescription
sessionUidstringRequiredSession UID returned by acquire.
ownerTokenstringRequiredOwner token returned by acquire.
senderIdstringOptionalWhatsApp registered sender phone number.
ttlSecondsintegerOptionalNew lease duration measured from the current request time.
cURL
curl -X POST "https://graph.whats91.com/api/v2/custom-boards/sessions/cbs_abc123/renew" \
  -H "Authorization: Bearer w91_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "senderId": "913614068784",
    "ownerToken": "one-time-release-token",
    "ttlSeconds": 1800
  }'
200 OK
{
  "success": true,
  "message": "Custom board session renewed",
  "data": {
    "session": {
      "sessionUid": "cbs_abc123",
      "status": "ACTIVE",
      "leaseExpiresAt": "2026-06-28T13:00:00.000Z",
      "renewedAt": "2026-06-28T12:30:00.000Z"
    }
  },
  "metadata": {
    "apiVersion": "v2",
    "requestId": "request-uuid"
  }
}

Renew extends the lease from the current request time and does not create a new session UID. The renew response does not repeat ownerToken.

SDK Examples

Use these examples as starting points for server-side implementations.

cURL
curl -X POST "https://graph.whats91.com/api/v2/custom-boards/sessions/{sessionUid}/renew" \
  -H "Authorization: Bearer w91_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
  "senderId": "913614068784",
  "ownerToken": "one-time-release-token",
  "ttlSeconds": 1800
}'
Node.js
const response = await fetch("https://graph.whats91.com/api/v2/custom-boards/sessions/{sessionUid}/renew", {
  method: "POST",
  headers: {
    "Authorization": "Bearer w91_live_xxx",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "senderId": "913614068784",
    "ownerToken": "one-time-release-token",
    "ttlSeconds": 1800
  })
});

const data = await response.json();
console.log(data);
PHP
$ch = curl_init("https://graph.whats91.com/api/v2/custom-boards/sessions/{sessionUid}/renew");
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer w91_live_xxx",
    "Content-Type: application/json"
  ],
  CURLOPT_POSTFIELDS => json_encode([
    "senderId" => "913614068784",
    "ownerToken" => "one-time-release-token",
    "ttlSeconds" => 1800
  ])
]);

$response = curl_exec($ch);
curl_close($ch);
echo $response;
Python
import requests

response = requests.request(
    "POST",
    "https://graph.whats91.com/api/v2/custom-boards/sessions/{sessionUid}/renew",
    headers={
        "Authorization": "Bearer w91_live_xxx",
        "Content-Type": "application/json",
    },
    json={
        "senderId": "913614068784",
        "ownerToken": "one-time-release-token",
        "ttlSeconds": 1800
    }
)

print(response.json())
C#
using System.Text;

using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer w91_live_xxx");

var request = new HttpRequestMessage(HttpMethod.Post, "https://graph.whats91.com/api/v2/custom-boards/sessions/{sessionUid}/renew");
request.Content = new StringContent(
  """
  {
    "senderId": "913614068784",
    "ownerToken": "one-time-release-token",
    "ttlSeconds": 1800
  }
  """,
  Encoding.UTF8,
  "application/json"
);

var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());

Related APIs