Repository navigation
Add sendWhatsApp transactional method - #238
Merged
Merged
Conversation
The edge backend serves POST /v1/send/whatsapp but the SDK did not expose it. Add SendWhatsAppRequest (mirroring SendSMSRequest, plus the from/tracked fields the handler reads) and APIClient.sendWhatsApp, with unit tests, live integration coverage, and docs. Verified against edge transactional/send_whatsapp.go.
sendWhatsApp transactional method
hanna-cio
approved these changes
Jul 13, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The backend serves
POST /v1/send/whatsapp, but the SDK did not expose it. This adds asendWhatsApptransactional method mirroring the existingsendSMS/sendPushsurface.Changes
SendWhatsAppRequestbuilder inlib/api/requests.ts— mirrorsSendSMSRequest, plus thefromandtrackedfields the handler reads.to/fromare E.164 phone numbers, optional only when the referencedtransactional_message_idalready defines them.APIClient.sendWhatsApp(req)→POST /v1/send/whatsapp, with the same instance guard as the other send methods.SendWhatsAppRequestre-exported fromlib/api.ts;SendWhatsAppRequestOptions+WhatsAppMessagefromindex.ts.CIO_TEST_WHATSAPP_TRANSACTIONAL_ID(+CIO_TEST_WHATSAPP_RECIPIENT), plus env-example and header docs.docs/app.mdWhatsApp subsection.Assisted by AI 🤖
Note
Low Risk
Additive API surface following the existing sendSMS pattern; no changes to auth or shared request plumbing beyond a new POST route.
Overview
Exposes transactional WhatsApp on the App API client for
POST /v1/send/whatsapp, which existed on the backend but was missing from the SDK.Adds
SendWhatsAppRequest(same builder pattern as SMS, with optional E.164to/from, plustrackedand the usual transactional flags),APIClient.sendWhatsApp, and public exports forSendWhatsAppRequestOptions/WhatsAppMessage. Unit tests cover instance validation, payload shape, and errors; a gated live test usesCIO_TEST_WHATSAPP_*env vars.docs/app.mddocuments usage with an example.Reviewed by Cursor Bugbot for commit f2824ec. Bugbot is set up for automated code reviews on this repo. Configure here.