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
Related documentation
POST
/api/v2/custom-boards/sessions/{sessionUid}/renewExtend an active session lease.
| Parameter | Type | Required | Description |
|---|---|---|---|
sessionUid | string | Required | Session UID returned by acquire. |
ownerToken | string | Required | Owner token returned by acquire. |
senderId | string | Optional | WhatsApp registered sender phone number. |
ttlSeconds | integer | Optional | New 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
Custom Boards
Let an external board take over a WhatsApp conversation without duplicate Whats91 automation replies.
List Keyword Exclusions
List sender-scoped keyword exclusions with status filtering.
Create Keyword Exclusion
Create a sender-scoped keyword exclusion that suppresses Whats91 internal automation.
Update Keyword Exclusion
Change the board, keyword, match mode, priority, or status of an existing exclusion.