How to send a WhatsApp text message via API v2
AvenPing API v2 sends WhatsApp session text through your linked line. Get a token, call GET /v2/me for a Meta
phoneNumberId, then POST /v2/messages/send/text. Parameter tables live in Messages, not on this page.
Prerequisites
- Premium or Enterprise with an active plan. See How to generate an API token.
- Read Authentication & requirements.
- An open 24-hour window for free-form text, or the send will fail the same way WhatsApp rejects session messages.
Step-by-step
Create a token
In the app, open Settings → API Settings and click Generate Token. Send it asAuthorization: BearerorX-API-Token.List phone IDs
Call GET /v2/me. Copy aphoneNumberIdfromphoneNumbers(ordefaultPhoneNumberId). See Account.POST the text
Call POST /v2/messages/send/text withphoneNumberId,to(orrecipientBSUID), and the text body. You can also use smart POST /v2/messages/send. Copy the exact JSON from Messages.Confirm in the inbox
Open Messages for that line. A successful send upserts the contact in AvenPing. Blocked contacts return403 FORBIDDENwithout calling Meta.
WARNING
Do not paste full endpoint catalogs here. When fields change, the messages reference is the source of truth.
FAQ
Why do I get 403 on phoneNumberId?
The ID is not on any WABA linked to this token. Use GET /v2/me and pick an ID from accounts / phoneNumbers.
Can I send text when the 24-hour window is closed?
Use a template send instead. See How to send a template via API v2.
Is there a contacts list API?
v2 does not expose a contacts catalog. Sends upsert the destination contact. Manage people in the Contacts UI.