Conversations
Calls (Calling API)
Phone number settings & profile
Kapso field helpers
Business-scoped user IDs
isBusinessScopedUserId checks whether a value has the shape of a BSUID, including the parent ENT variant. Use it at your boundaries, for example to keep BSUIDs out of phone number columns:
The send builders deliberately do not enforce the shape, so a future format change on Meta’s side doesn’t turn valid sends into client-side errors.
Webhooks
normalizeWebhook() unwraps Meta’s Graph payload, converts it to the same structure returned by messages.query, and sets kapso.direction ("inbound"/"outbound"). SMB echoes are tagged with kapso.source = "smb_message_echo", and every other webhook field (for example accountAlerts, templateCategoryUpdate) is available under events.raw.<fieldName>.
Identity fields are typed on every event: message.fromUserId (the sender’s BSUID, present on every inbound message), message.from (the phone number, which can be absent once the sender adopts a username), contact.userId and contact.profile.username, and status.recipientUserId. Direction inference works even when no phone number arrives.
See the full list of Kapso fields in Kapso Extensions.
verifySignature depends on Node’s crypto module and is intended for server runtimes. If your bundler shows a warning about node:crypto being external, that’s expected — mark it as external or set the bundler platform to node.