A step-by-step migration from Whats91 API v2 to v3, including what stays the same and what v3 adds.
Migrating v2 to v3
Summary
A step-by-step migration from Whats91 API v2 to v3, including what stays the same and what v3 adds.
Prerequisites
- A Whats91 account
Related documentation
v3 is additive. It registers the same route inventory as v2 in the same order, and preserves the v2 request and response contract for every endpoint. In practice a migration is a base URL change plus optional adoption of the new capability.
Tip
There are no breaking changes between v2 and v3. Every request that works against /api/v2 works unchanged against /api/v3.
Step 1: Change the Base URL
- https://graph.whats91.com/api/v2
+ https://graph.whats91.com/api/v3Tokens, sender resolution, number scoping, rate limits, blacklist checks, billing checks, and response headers behave identically. No token needs to be regenerated.
Step 2: Expect the New apiVersion Value
Responses report metadata.apiVersion: "v3". If your code asserts on this value, update the assertion.
{
"metadata": {
"apiVersion": "v3",
"requestId": "request-uuid",
"processingTimeMs": 120
}
}Step 3: Tolerate Additive Response Fields
v3 adds read-only fields to existing responses. Strict schema validators that reject unknown properties must be relaxed before switching.
| Endpoint | Added response fields |
|---|---|
| GET /api/v3/templates | source, correctCategory |
| GET /api/v3/templates/{identifier} | source, correctCategory |
| GET /api/v3/reports/messages | sendRoute, directSendCategory, directSendTemplateName, ttlSeconds, metaTemplateId |
| GET /api/v3/reports/analytics/delivery | Send-route breakdown data |
| GET /api/v3/reports/analytics/templates | Meta template id attribution |
| POST /api/v3/chat | data.directSend, present only when Direct Send was requested |
Step 4: Adopt New Capability (Optional)
| Capability | How to adopt |
|---|---|
| Direct Send | Add category (utility or authentication) to POST /api/v3/chat, or Meta-native category to the Meta-compatible routes. See the Direct Send section. |
| Template source filtering | Add ?source=AUTO_GENERATED or ?source=MANUAL to GET /api/v3/templates. |
| Send-route reporting | Add ?sendRoute= and ?directSendCategory= filters to GET /api/v3/reports/messages, and read the new row fields. |
One Behavioural Difference to Know
POST /api/v3/send rejects Direct Send fields with HTTP 400 and error code DIRECT_SEND_NOT_SUPPORTED_ON_TEMPLATE_SEND. This only affects requests that send Direct Send fields to the approved-template endpoint, which is not valid on v2 either.
What Does Not Change
- Authentication: the same bearer tokens and the same compatibility fallbacks.
- Route inventory: v3 has no endpoint that does not exist in v2.
- Webhook destinations, event keys, signing, and delivery behaviour.
- Rate limits, error envelope, error codes, and response headers.
- Billing, blacklist, reconnect-queue, and reporting behaviour for non-Direct-Send traffic.
Rollback
Because v3 is additive, rollback is the reverse base URL change. v1 and v2 are frozen and unaffected by v3 traffic. The only requests that cannot be rolled back are Direct Send requests, which have no v2 equivalent.
Related Documentation
Overview
Introduction to Whats91 public API v2 and its canonical endpoint surface.
Quick Start
Generate a v2 token and send your first WhatsApp text message through Whats91.
Authentication
Authenticate public v2 requests with managed Whats91 bearer tokens.
API Keys
Generate and manage managed w91_live_ API tokens from the Whats91 dashboard.