Skip to content
Whats91

Create a sender-scoped keyword exclusion that suppresses Whats91 internal automation.

Create Keyword Exclusion

Summary

Create a sender-scoped keyword exclusion that suppresses Whats91 internal automation.

Prerequisites

  • Authorization: Bearer w91_live_xxx
  • Content-Type: application/json for JSON requests

Keyword exclusions are message-scoped: the exclusion suppresses Whats91 internal automation for the matching inbound message, but it does not take ownership of the conversation. Acquire a session immediately afterwards so follow-up messages stay with your board.

matchModeMatching rule
EXACTNormalized message text must equal the keyword.
CONTAINSNormalized message text must contain the keyword.
WHOLE_WORDKeyword must match as a whole word or phrase.
REGEXRaw message text is tested against the supplied regular expression.
POST/api/v2/custom-boards/keyword-exclusions

Create a keyword exclusion.

ParameterTypeRequiredDescription
senderIdstringOptionalWhatsApp registered sender phone number.
phoneNumberIdstringOptionalMeta WhatsApp Business phone-number ID.
boardUidstringRequiredStable external board identifier controlled by the integrator.
keywordstringRequiredKeyword or pattern to match.
matchModestringRequiredEXACT, CONTAINS, WHOLE_WORD, or REGEX.
priorityintegerOptionalEvaluation priority among exclusions.
statusstringOptionalACTIVE or INACTIVE.
cURL
curl -X POST "https://graph.whats91.com/api/v2/custom-boards/keyword-exclusions" \
  -H "Authorization: Bearer w91_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "senderId": "913614068784",
    "phoneNumberId": "486728586446799",
    "boardUid": "external-board-1",
    "keyword": "trackrod",
    "matchMode": "WHOLE_WORD",
    "priority": 10,
    "status": "ACTIVE"
  }'
200 OK
{
  "success": true,
  "message": "Custom board keyword exclusion created",
  "data": {
    "senderId": "913614068784",
    "phoneNumberId": "486728586446799",
    "keywordExclusion": {
      "uid": "cbke_abc123",
      "boardUid": "external-board-1",
      "keyword": "trackrod",
      "normalizedKeyword": "trackrod",
      "matchMode": "WHOLE_WORD",
      "priority": 10,
      "status": "ACTIVE",
      "createdAt": "2026-06-28T08:00:00.000Z",
      "updatedAt": "2026-06-28T08:00:00.000Z"
    }
  },
  "metadata": {
    "apiVersion": "v2",
    "requestId": "request-uuid"
  }
}

SDK Examples

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

cURL
curl -X POST "https://graph.whats91.com/api/v2/custom-boards/keyword-exclusions" \
  -H "Authorization: Bearer w91_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
  "senderId": "913614068784",
  "phoneNumberId": "486728586446799",
  "boardUid": "external-board-1",
  "keyword": "trackrod",
  "matchMode": "WHOLE_WORD",
  "priority": 10,
  "status": "ACTIVE"
}'
Node.js
const response = await fetch("https://graph.whats91.com/api/v2/custom-boards/keyword-exclusions", {
  method: "POST",
  headers: {
    "Authorization": "Bearer w91_live_xxx",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "senderId": "913614068784",
    "phoneNumberId": "486728586446799",
    "boardUid": "external-board-1",
    "keyword": "trackrod",
    "matchMode": "WHOLE_WORD",
    "priority": 10,
    "status": "ACTIVE"
  })
});

const data = await response.json();
console.log(data);
PHP
$ch = curl_init("https://graph.whats91.com/api/v2/custom-boards/keyword-exclusions");
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",
    "phoneNumberId" => "486728586446799",
    "boardUid" => "external-board-1",
    "keyword" => "trackrod",
    "matchMode" => "WHOLE_WORD",
    "priority" => 10,
    "status" => "ACTIVE"
  ])
]);

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

response = requests.request(
    "POST",
    "https://graph.whats91.com/api/v2/custom-boards/keyword-exclusions",
    headers={
        "Authorization": "Bearer w91_live_xxx",
        "Content-Type": "application/json",
    },
    json={
        "senderId": "913614068784",
        "phoneNumberId": "486728586446799",
        "boardUid": "external-board-1",
        "keyword": "trackrod",
        "matchMode": "WHOLE_WORD",
        "priority": 10,
        "status": "ACTIVE"
    }
)

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/keyword-exclusions");
request.Content = new StringContent(
  """
  {
    "senderId": "913614068784",
    "phoneNumberId": "486728586446799",
    "boardUid": "external-board-1",
    "keyword": "trackrod",
    "matchMode": "WHOLE_WORD",
    "priority": 10,
    "status": "ACTIVE"
  }
  """,
  Encoding.UTF8,
  "application/json"
);

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

Related APIs