Connect WhatsApp via credentials
Connect a WhatsApp Business Account by providing Meta credentials directly. This is the headless alternative to the Embedded Signup browser flow.
To get the required credentials:
- Go to Meta Business Suite (business.facebook.com)
- Create or select a WhatsApp Business Account
- In Business Settings > System Users, create a System User
- Assign it the whatsapp_business_management and whatsapp_business_messaging permissions
- Generate a permanent access token
- Get the WABA ID from WhatsApp Manager > Account Tools > Phone Numbers
- Get the Phone Number ID from the same page (click on the number)
Warning: connecting subscribes your own Meta app to this WABA with an override callback that redirects its webhook delivery to Zernio. This WABA's events stop reaching any callback URL you had configured before, immediately and with no overlap window. Do not unsubscribe your app from the WABA afterward: that also cuts off Zernio's delivery, and recovery requires calling this endpoint again.
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
{ "message": "WhatsApp connected successfully", "account": { "accountId": "6507a1b2c3d4e5f6a7b8c9d0", "platform": "whatsapp", "username": "+1 555-123-4567", "displayName": "Acme Corp", "isActive": true, "phoneNumber": "+1 555-123-4567", "verifiedName": "Acme Corp", "qualityRating": "GREEN" }}Connect an OpenAI Ads account
Connect an OpenAI Ads account using an API key from ChatGPT Ads Manager. The key grants full campaign write access on OpenAI's side (OpenAI does not offer a read-only key scope). Zernio uses it to read ads and performance, and to create and manage campaigns you set up through Zernio (create, status, budget, and cancel). Campaigns created directly in ChatGPT Ads Manager can still be managed there.
Connect WhatsApp from Embedded Signup
Exchange the authorization code Meta's Embedded Signup popup returned. This is the call the Zernio-hosted signup page makes after the popup closes (`GET /v1/connect/whatsapp?signup=hosted`), sending the `wabaId` and `phoneNumberId` Meta reported so exactly the chosen number is connected; when both are omitted the first number the token can see is used. The code never passes through a `redirect_uri`, so `POST /v1/connect/{platform}` cannot accept it. Authenticates with an API key, or with the connect token the hosted flow issues (`X-Connect-Token` header).