Meta Business Agent
Send a business event
Tell the agent something happened in your systems (order shipped, document verified) so it messages the consumer about it. The consumer must already have a conversation with the number. Answers 202 with the event id; poll it for the outcome.
Authorization
bearerAuth AuthorizationBearer <token>
API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Path Parameters
accountId*string
WhatsApp social account id (the number must be managed through the Cloud API).
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.businessagent.sendBusinessAgentEvent({ path: { accountId: 'account_abc123', }, body: { to: '+34600000000', type: 'order_shipped', description: 'Hello, world!', payload: 'string', },});console.log(data);{ "status": "string", "agent_event_id": "string"}Was this page helpful?