Browse endpoints
Webhooks
Every monitor event is POSTed as JSON to one HTTPS URL per account. Deliveries are free and never trigger an Instagram lookup.
Endpoints
| Endpoint | Description | Cost |
|---|---|---|
| GET /v1/webhook | Your webhook URL, signing secret and status (null if unset). | Free |
| PUT /v1/webhook | Set the URL: {"url": "https://..."}. Creates the signing secret the first time and re-enables a disabled webhook. | Free |
| DELETE /v1/webhook | Remove the webhook. Events are still recorded. | Free |
| POST /v1/webhook/rotate-secret | Issue a new signing secret (takes effect immediately). | Free |
| POST /v1/webhook/test | Send a webhook.test event. | Free |
| GET /v1/webhook/deliveries | Delivery log, newest first (?limit= up to 200). | Free |
| POST /v1/webhook/deliveries/{id}/redeliver | Retry a failed delivery. | Free |
URLs must be https:// on a public hostname (port 443 or 8443). Localhost, private, link-local and other reserved addresses are refused, both when you save the URL and again at delivery time.
Payload
{
"id": "jd7f...",
"type": "profile.followers_changed",
"created_at": "2026-12-02T09:00:00.000Z",
"data": {
"monitor_id": "k57...",
"username": "nike",
"field": "followers",
"before": 291950000,
"after": 291952375,
"delta": 2375,
"profile": {
"id": "13460080",
"username": "nike",
"followers": 291952375,
"posts": 1657
}
}
}Headers:
X-ProfileQuery-Event: the event typeX-ProfileQuery-Delivery: unique delivery id (use it to de-duplicate retries)X-ProfileQuery-Signature:t=<unix seconds>,v1=<hex HMAC-SHA256>
Verifying signatures
Compute HMAC-SHA256(secret, t + "." + rawBody) and compare it to v1 in constant time. Reject timestamps more than 5 minutes old.
import crypto from "node:crypto";
export function verify(rawBody, header, secret) {
const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
if (Math.abs(Date.now() / 1000 - Number(parts.t)) > 300) return false;
const expected = crypto.createHmac("sha256", secret).update(`${parts.t}.${rawBody}`).digest("hex");
return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1 ?? ""));
}Retries
Respond with any 2xx within 10 seconds. Anything else (including redirects, which are not followed) is retried after 1 minute, 5 minutes, 30 minutes, 2 hours and 8 hours: 6 attempts in total. Every attempt is in the delivery log. After 20 deliveries in a row fail all their retries, the webhook is disabled; save the URL again to re-enable it.
curl -X PUT "https://api.profilequery.com/v1/webhook" \
-H "Authorization: Bearer $PROFILEQUERY_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/hooks/profilequery"}'
curl -X POST "https://api.profilequery.com/v1/webhook/test" -H "Authorization: Bearer $PROFILEQUERY_KEY"