Triggered when a WhatsApp account is disconnected for a workspace user.
The unique identifier for the partner.
A JSON Web Token (JWT) signed with your Partner Secret using the HS256 algorithm. Use this header to verify that the webhook was genuinely sent by TimelinesAI.
The JWT contains the following claims:
| Claim | Description | |-------|-------------| | partner_id | Your partner identifier — must match the X-TL-Partner-Id header | | nbf | Not-before timestamp (Unix epoch) | | exp | Expiration timestamp (Unix epoch) |
Verification steps:
X-TL-Signature header value from the incoming request.partner_id claim matches the X-TL-Partner-Id header.JavaScript example:
const jwt = require(''jsonwebtoken'');
function verifyWebhook(req) {
const signature = req.headers[''x-tl-signature''];
const partnerId = req.headers[''x-tl-partner-id''];
try {
const decoded = jwt.verify(signature, PARTNER_SECRET);
return decoded.partner_id === partnerId;
} catch (err) {
return false;
}
}Python example:
import jwt
def verify_webhook(headers):
signature = headers.get(''X-TL-Signature'')
partner_id = headers.get(''X-TL-Partner-Id'')
try:
decoded = jwt.decode(signature, PARTNER_SECRET, algorithms=[''HS256''])
return decoded[''partner_id''] == partner_id
except jwt.InvalidTokenError:
return FalseSee the PartnerAPI Webhooks Overview for more details.
Webhook payload sent when a WhatsApp account is successfully connected / disconnected for a user in a partner-managed workspace. No event is emitted for idempotent no-op operations (for example when the account is already connected / disconnected).
Identifier of the workspace where the WhatsApp account was connected / disconnected.
"my-workspace"
Partner webhook event name.
whatsapp_account:connected, whatsapp_account:disconnected "whatsapp_account:disconnected"
Unique identifier of the partner that owns the workspace.
"partner_12345"
Timestamp when the event was triggered.
"2024-01-01T12:00:00.000Z"
Internal WhatsApp account identifier.
67890
Phone number associated with the WhatsApp account in E.164
"+123456789"
Identifier of the user in the workspace who owns the WhatsApp
98765
"2024-01-01T12:00:00.000Z"
"(logged out)"
Receiver accepted the event