curl --request POST \
--url https://workflows.pingmee.co.il/workflows/{workflowId}/trigger \
--header 'Content-Type: application/json' \
--header 'Cookie: <api-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"phoneNumberId": "phone_number_id_example",
"customerPhoneNumberId": "customer_phone_id_example",
"triggerData": {
"websiteLink": "https://example.com"
}
}
'import requests
url = "https://workflows.pingmee.co.il/workflows/{workflowId}/trigger"
payload = {
"phoneNumberId": "phone_number_id_example",
"customerPhoneNumberId": "customer_phone_id_example",
"triggerData": { "websiteLink": "https://example.com" }
}
headers = {
"Cookie": "<api-key>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Cookie: '<api-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
phoneNumberId: 'phone_number_id_example',
customerPhoneNumberId: 'customer_phone_id_example',
triggerData: {websiteLink: 'https://example.com'}
})
};
fetch('https://workflows.pingmee.co.il/workflows/{workflowId}/trigger', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://workflows.pingmee.co.il/workflows/{workflowId}/trigger",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'phoneNumberId' => 'phone_number_id_example',
'customerPhoneNumberId' => 'customer_phone_id_example',
'triggerData' => [
'websiteLink' => 'https://example.com'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Cookie: <api-key>",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://workflows.pingmee.co.il/workflows/{workflowId}/trigger"
payload := strings.NewReader("{\n \"phoneNumberId\": \"phone_number_id_example\",\n \"customerPhoneNumberId\": \"customer_phone_id_example\",\n \"triggerData\": {\n \"websiteLink\": \"https://example.com\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Cookie", "<api-key>")
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://workflows.pingmee.co.il/workflows/{workflowId}/trigger")
.header("Cookie", "<api-key>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"phoneNumberId\": \"phone_number_id_example\",\n \"customerPhoneNumberId\": \"customer_phone_id_example\",\n \"triggerData\": {\n \"websiteLink\": \"https://example.com\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://workflows.pingmee.co.il/workflows/{workflowId}/trigger")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Cookie"] = '<api-key>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phoneNumberId\": \"phone_number_id_example\",\n \"customerPhoneNumberId\": \"customer_phone_id_example\",\n \"triggerData\": {\n \"websiteLink\": \"https://example.com\"\n }\n}"
response = http.request(request)
puts response.read_body{
"ok": true
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Trigger Workflow
Manually trigger a bot workflow for a conversation. This call is a starter: it opens the thread from the business side, so the workflow’s first WhatsApp node must be messageType: template + templateType: whatsapp with an APPROVED catalog template. Optional body triggerData is copied onto the trigger node output and read with return $<triggerNodeId>.triggerData.<key>;. Path workflowId must be URL-encoded.
curl --request POST \
--url https://workflows.pingmee.co.il/workflows/{workflowId}/trigger \
--header 'Content-Type: application/json' \
--header 'Cookie: <api-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"phoneNumberId": "phone_number_id_example",
"customerPhoneNumberId": "customer_phone_id_example",
"triggerData": {
"websiteLink": "https://example.com"
}
}
'import requests
url = "https://workflows.pingmee.co.il/workflows/{workflowId}/trigger"
payload = {
"phoneNumberId": "phone_number_id_example",
"customerPhoneNumberId": "customer_phone_id_example",
"triggerData": { "websiteLink": "https://example.com" }
}
headers = {
"Cookie": "<api-key>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Cookie: '<api-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
phoneNumberId: 'phone_number_id_example',
customerPhoneNumberId: 'customer_phone_id_example',
triggerData: {websiteLink: 'https://example.com'}
})
};
fetch('https://workflows.pingmee.co.il/workflows/{workflowId}/trigger', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://workflows.pingmee.co.il/workflows/{workflowId}/trigger",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'phoneNumberId' => 'phone_number_id_example',
'customerPhoneNumberId' => 'customer_phone_id_example',
'triggerData' => [
'websiteLink' => 'https://example.com'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Cookie: <api-key>",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://workflows.pingmee.co.il/workflows/{workflowId}/trigger"
payload := strings.NewReader("{\n \"phoneNumberId\": \"phone_number_id_example\",\n \"customerPhoneNumberId\": \"customer_phone_id_example\",\n \"triggerData\": {\n \"websiteLink\": \"https://example.com\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Cookie", "<api-key>")
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://workflows.pingmee.co.il/workflows/{workflowId}/trigger")
.header("Cookie", "<api-key>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"phoneNumberId\": \"phone_number_id_example\",\n \"customerPhoneNumberId\": \"customer_phone_id_example\",\n \"triggerData\": {\n \"websiteLink\": \"https://example.com\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://workflows.pingmee.co.il/workflows/{workflowId}/trigger")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Cookie"] = '<api-key>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phoneNumberId\": \"phone_number_id_example\",\n \"customerPhoneNumberId\": \"customer_phone_id_example\",\n \"triggerData\": {\n \"websiteLink\": \"https://example.com\"\n }\n}"
response = http.request(request)
puts response.read_body{
"ok": true
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}workflowId must be URL-encoded.
Optional triggerData is a JSON object copied onto the trigger node’s output. Downstream WhatsApp / HTTP / Task fields read it with an Expression. The $… id is the trigger node id, not the workflow id:
return $trig_1.triggerData.websiteLink;
{
"phoneNumberId": "phone_number_id_example",
"customerPhoneNumberId": "customer_phone_id_example",
"triggerData": {
"websiteLink": "https://example.com"
}
}
{{n}} — see triggerData and a dual-graph snippet in Examples.
This call is a starter: it opens a conversation from the business side. The workflow’s first WhatsApp node must be messageType: "template" + templateType: "whatsapp" with an APPROVED catalog template — WhatsApp templates. (Inbound reply bots that use pingmeeTrigger do not go through this endpoint and may use messageType: "custom".) phoneNumberId in the body should match the workflow’s associatedToBusinessId.
startWithNodeId that skips the trigger does not seed output.triggerData. A workflow pointer does not forward this payload to the child — POST /trigger on the workflow that should receive it.Authorizations
Path Parameters
Body
Conversation, optional node to start from, and optional triggerData JSON copied onto the trigger node output.
Optional JSON object copied onto the trigger node's output as triggerData. Downstream expressions read it as return $<triggerNodeId>.triggerData.<key>; (the $… id is the trigger node id, not the workflow id). Must be a JSON object (not an array), at most 32768 bytes, nesting depth at most 10. See Build workflows → Variables.
{ "websiteLink": "https://example.com" }
Was this page helpful?