Triggering an outbound WhatsApp virtual agent

You can jumpstart the outbound session from any platform of your choosing, e.g. Postman.
Please make sure that you have configured and set up your WhatsApp template messages correctly. Learn more about creating WhatsApp templates here.
You can add dynamic parameters to your template that will change according to the value you add to your query. See the example below for "PARAM1_VALUE".
The query will look like the following -

Endpoint (mandatory)

The endpoint depends on the region you selected for your agent
For EU agents --> https://studio-api-eu.ai.vonage.com/messaging/conversation
For US agents --> https://studio-api-us.ai.vonage.com/messaging/conversation

Method (mandatory)

POST

Headers (mandatory)

X-Vgai-Key
You can find the X-Vgai-Key on the top right of your canvas. Click on the "user" icon, and then "Generate API Key".

Request Body

{
"components": [
{
"type": "header",
"parameters": [
{
"type": "text",
"text": "PARAM1_VALUE"
}
]
},
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "PARAM2_VALUE"
}
]
}
],
"namespace": "NAMESPACE_ID",
"template": "TEMPLATE_NAME",
"locale": "en",
"to": "TO_NUMBER",
"agent_id": "AGENT_ID",
"channel": "whatsapp",
"status_url": "string",
"session_parameters": [
{
"name": "string",
"value": "string"
}
]
}
Namespace, template, locale, to, agent ID, channel, and status URL are mandatory to include within the request body.