curl --request POST \
--url https://campaigns.pingmee.co.il/campaigns \
--header 'Content-Type: application/json' \
--header 'Cookie: <api-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"id": "<string>",
"name": "<string>",
"contentType": "triggerWorkflow",
"workflowId": "<string>",
"workflowName": "<string>",
"folderId": "1785185339087",
"associatedToBusinessId": "<string>",
"isActive": true,
"source": "tags",
"conversationTags": [
{
"id": "<string>",
"title": "<string>",
"color": "<string>",
"associatedTo": "<string>"
}
],
"description": "<string>",
"scheduledAt": 123,
"audienceCountry": "IL"
}
'import requests
url = "https://campaigns.pingmee.co.il/campaigns"
payload = {
"id": "<string>",
"name": "<string>",
"contentType": "triggerWorkflow",
"workflowId": "<string>",
"workflowName": "<string>",
"folderId": "1785185339087",
"associatedToBusinessId": "<string>",
"isActive": True,
"source": "tags",
"conversationTags": [
{
"id": "<string>",
"title": "<string>",
"color": "<string>",
"associatedTo": "<string>"
}
],
"description": "<string>",
"scheduledAt": 123,
"audienceCountry": "IL"
}
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({
id: '<string>',
name: '<string>',
contentType: 'triggerWorkflow',
workflowId: '<string>',
workflowName: '<string>',
folderId: '1785185339087',
associatedToBusinessId: '<string>',
isActive: true,
source: 'tags',
conversationTags: [
{id: '<string>', title: '<string>', color: '<string>', associatedTo: '<string>'}
],
description: '<string>',
scheduledAt: 123,
audienceCountry: 'IL'
})
};
fetch('https://campaigns.pingmee.co.il/campaigns', 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://campaigns.pingmee.co.il/campaigns",
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([
'id' => '<string>',
'name' => '<string>',
'contentType' => 'triggerWorkflow',
'workflowId' => '<string>',
'workflowName' => '<string>',
'folderId' => '1785185339087',
'associatedToBusinessId' => '<string>',
'isActive' => true,
'source' => 'tags',
'conversationTags' => [
[
'id' => '<string>',
'title' => '<string>',
'color' => '<string>',
'associatedTo' => '<string>'
]
],
'description' => '<string>',
'scheduledAt' => 123,
'audienceCountry' => 'IL'
]),
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://campaigns.pingmee.co.il/campaigns"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"contentType\": \"triggerWorkflow\",\n \"workflowId\": \"<string>\",\n \"workflowName\": \"<string>\",\n \"folderId\": \"1785185339087\",\n \"associatedToBusinessId\": \"<string>\",\n \"isActive\": true,\n \"source\": \"tags\",\n \"conversationTags\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"color\": \"<string>\",\n \"associatedTo\": \"<string>\"\n }\n ],\n \"description\": \"<string>\",\n \"scheduledAt\": 123,\n \"audienceCountry\": \"IL\"\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://campaigns.pingmee.co.il/campaigns")
.header("Cookie", "<api-key>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"contentType\": \"triggerWorkflow\",\n \"workflowId\": \"<string>\",\n \"workflowName\": \"<string>\",\n \"folderId\": \"1785185339087\",\n \"associatedToBusinessId\": \"<string>\",\n \"isActive\": true,\n \"source\": \"tags\",\n \"conversationTags\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"color\": \"<string>\",\n \"associatedTo\": \"<string>\"\n }\n ],\n \"description\": \"<string>\",\n \"scheduledAt\": 123,\n \"audienceCountry\": \"IL\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://campaigns.pingmee.co.il/campaigns")
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 \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"contentType\": \"triggerWorkflow\",\n \"workflowId\": \"<string>\",\n \"workflowName\": \"<string>\",\n \"folderId\": \"1785185339087\",\n \"associatedToBusinessId\": \"<string>\",\n \"isActive\": true,\n \"source\": \"tags\",\n \"conversationTags\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"color\": \"<string>\",\n \"associatedTo\": \"<string>\"\n }\n ],\n \"description\": \"<string>\",\n \"scheduledAt\": 123,\n \"audienceCountry\": \"IL\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Campaign '1710000000000' created."
}{
"error": "<string>",
"message": "<string>"
}Create Campaign
Creates a campaign.
curl --request POST \
--url https://campaigns.pingmee.co.il/campaigns \
--header 'Content-Type: application/json' \
--header 'Cookie: <api-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"id": "<string>",
"name": "<string>",
"contentType": "triggerWorkflow",
"workflowId": "<string>",
"workflowName": "<string>",
"folderId": "1785185339087",
"associatedToBusinessId": "<string>",
"isActive": true,
"source": "tags",
"conversationTags": [
{
"id": "<string>",
"title": "<string>",
"color": "<string>",
"associatedTo": "<string>"
}
],
"description": "<string>",
"scheduledAt": 123,
"audienceCountry": "IL"
}
'import requests
url = "https://campaigns.pingmee.co.il/campaigns"
payload = {
"id": "<string>",
"name": "<string>",
"contentType": "triggerWorkflow",
"workflowId": "<string>",
"workflowName": "<string>",
"folderId": "1785185339087",
"associatedToBusinessId": "<string>",
"isActive": True,
"source": "tags",
"conversationTags": [
{
"id": "<string>",
"title": "<string>",
"color": "<string>",
"associatedTo": "<string>"
}
],
"description": "<string>",
"scheduledAt": 123,
"audienceCountry": "IL"
}
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({
id: '<string>',
name: '<string>',
contentType: 'triggerWorkflow',
workflowId: '<string>',
workflowName: '<string>',
folderId: '1785185339087',
associatedToBusinessId: '<string>',
isActive: true,
source: 'tags',
conversationTags: [
{id: '<string>', title: '<string>', color: '<string>', associatedTo: '<string>'}
],
description: '<string>',
scheduledAt: 123,
audienceCountry: 'IL'
})
};
fetch('https://campaigns.pingmee.co.il/campaigns', 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://campaigns.pingmee.co.il/campaigns",
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([
'id' => '<string>',
'name' => '<string>',
'contentType' => 'triggerWorkflow',
'workflowId' => '<string>',
'workflowName' => '<string>',
'folderId' => '1785185339087',
'associatedToBusinessId' => '<string>',
'isActive' => true,
'source' => 'tags',
'conversationTags' => [
[
'id' => '<string>',
'title' => '<string>',
'color' => '<string>',
'associatedTo' => '<string>'
]
],
'description' => '<string>',
'scheduledAt' => 123,
'audienceCountry' => 'IL'
]),
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://campaigns.pingmee.co.il/campaigns"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"contentType\": \"triggerWorkflow\",\n \"workflowId\": \"<string>\",\n \"workflowName\": \"<string>\",\n \"folderId\": \"1785185339087\",\n \"associatedToBusinessId\": \"<string>\",\n \"isActive\": true,\n \"source\": \"tags\",\n \"conversationTags\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"color\": \"<string>\",\n \"associatedTo\": \"<string>\"\n }\n ],\n \"description\": \"<string>\",\n \"scheduledAt\": 123,\n \"audienceCountry\": \"IL\"\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://campaigns.pingmee.co.il/campaigns")
.header("Cookie", "<api-key>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"contentType\": \"triggerWorkflow\",\n \"workflowId\": \"<string>\",\n \"workflowName\": \"<string>\",\n \"folderId\": \"1785185339087\",\n \"associatedToBusinessId\": \"<string>\",\n \"isActive\": true,\n \"source\": \"tags\",\n \"conversationTags\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"color\": \"<string>\",\n \"associatedTo\": \"<string>\"\n }\n ],\n \"description\": \"<string>\",\n \"scheduledAt\": 123,\n \"audienceCountry\": \"IL\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://campaigns.pingmee.co.il/campaigns")
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 \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"contentType\": \"triggerWorkflow\",\n \"workflowId\": \"<string>\",\n \"workflowName\": \"<string>\",\n \"folderId\": \"1785185339087\",\n \"associatedToBusinessId\": \"<string>\",\n \"isActive\": true,\n \"source\": \"tags\",\n \"conversationTags\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"color\": \"<string>\",\n \"associatedTo\": \"<string>\"\n }\n ],\n \"description\": \"<string>\",\n \"scheduledAt\": 123,\n \"audienceCountry\": \"IL\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Campaign '1710000000000' created."
}{
"error": "<string>",
"message": "<string>"
}https://campaigns.pingmee.co.il.Authorizations
Personal access token from Pingmee Settings → Developer Tools
Business API key from Pingmee Settings → Developer Tools
Body
Campaign to create.
- Tags
- Excel
Campaign id.
Campaign name.
Runs a workflow.
triggerWorkflow Workflow id.
Workflow name.
Campaign folder id. In the Pingmee app this is the path segment in https://chat.pingmee.co.il/dashboard/campaigns/{folderId}.
"1785185339087"
now sends immediately. future sends at scheduledAt.
now, future Phone number id the campaign sends from.
Whether the campaign is active.
Send to tagged conversations.
tags Tags.
Show child attributes
Show child attributes
Campaign description.
Send time in Unix milliseconds. Required when whenToSendMessage is future.
ISO country code for numbers without a calling code.
"IL"
Response
Campaign created
"Campaign '1710000000000' created."
Was this page helpful?