Monitors
Create a monitor
POST /v1/monitors creates a monitor and runs the first check right away. The first check only records what exists; alerts start with the next one. Each check costs 1 credit, and checks are skipped while the workspace has no credits left. The number of monitors depends on the plan: 2 on Free, 15 on Creator, 100 on Pro and unlimited on Business.
curl -X POST "https://postkea.com/api/v1/monitors" \
-H "Authorization: Bearer $POSTKEA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Clay Club on TikTok",
"platform": "tiktok",
"kind": "profile",
"target": "@clayclub",
"intervalMinutes": 180,
"notify": {
"email": true,
"inApp": true
}
}'const res = await fetch("https://postkea.com/api/v1/monitors", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POSTKEA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Clay Club on TikTok",
platform: "tiktok",
kind: "profile",
target: "@clayclub",
intervalMinutes: 180,
notify: {
email: true,
inApp: true,
},
}),
});
const { data: monitor } = await res.json();
console.log(monitor);import os, requests
r = requests.post(
"https://postkea.com/api/v1/monitors",
headers={"Authorization": f"Bearer {os.environ['POSTKEA_API_KEY']}"},
json={
"name": "Clay Club on TikTok",
"platform": "tiktok",
"kind": "profile",
"target": "@clayclub",
"intervalMinutes": 180,
"notify": {
"email": True,
"inApp": True,
},
},
)
monitor = r.json()["data"]
print(monitor)What each network supports
Monitors use the scraping operations of each network, so they support what those operations can read:
History and new items
GET /v1/monitors/{id} returns the monitor with its latest numbers and its snapshots: one per check, with the metrics at that time and the new items found.
curl "https://postkea.com/api/v1/monitors/mon_7Lw2" \
-H "Authorization: Bearer $POSTKEA_API_KEY"const res = await fetch("https://postkea.com/api/v1/monitors/mon_7Lw2", {
headers: { Authorization: `Bearer ${process.env.POSTKEA_API_KEY}` },
});
const { data: monitor } = await res.json();
console.log(monitor);import os, requests
r = requests.get(
"https://postkea.com/api/v1/monitors/mon_7Lw2",
headers={"Authorization": f"Bearer {os.environ['POSTKEA_API_KEY']}"},
)
monitor = r.json()["data"]
print(monitor)GET /v1/monitorslists every monitor with its last check, next check and last error.POST /v1/monitors/{id}/checkchecks right away.PATCH /v1/monitors/{id}changes the name, interval, notifications oractive;DELETEremoves it and its history.
Alerts and automations
When a check finds new items, Postkea sends the monitor.new_items event with the monitor id, name, platform and up to 20 new items, plus the email and in-app notifications you turned on.