RankPilot API

Send an API key as a Bearer token. Every response carries data_through, coverage and rate-limit headers; limits are shared by every key of a workspace.

Webhooks

GET/webhooks

Webhook endpoints with their event subscription (workspace owner keys only)

curl

curl -H "Authorization: Bearer $RANKPILOT_API_KEY" \
  "https://rank.hanzla.com/api/v1/webhooks"

Node

const res = await fetch("https://rank.hanzla.com/api/v1/webhooks", {
  headers: {
    Authorization: `Bearer ${process.env.RANKPILOT_API_KEY}`,
  },
});
console.log(await res.json());

POST/webhooksWrite key, Pro

Add a webhook endpoint; the signing secret is shown once

Parameters of POST /webhooks
NameInTypeRequired
Idempotency-Keyheaderstringno

curl

curl -X POST -H "Authorization: Bearer $RANKPILOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"<name>","url":"<url>"}' \
  "https://rank.hanzla.com/api/v1/webhooks"

Node

const res = await fetch("https://rank.hanzla.com/api/v1/webhooks", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.RANKPILOT_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"name":"<name>","url":"<url>"}),
});
console.log(await res.json());

PATCH/webhooks/{id}Write key, Pro

Rename, pause, or change event types, properties and minimum severity

Parameters of PATCH /webhooks/{id}
NameInTypeRequired
idpathstringyes

curl

curl -X PATCH -H "Authorization: Bearer $RANKPILOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"<name>","active":true,"event_types":[],"property_ids":"<property_ids>","min_severity":"<min_severity>","enabled":true}' \
  "https://rank.hanzla.com/api/v1/webhooks/<property-id>"

Node

const res = await fetch("https://rank.hanzla.com/api/v1/webhooks/<property-id>", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.RANKPILOT_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"name":"<name>","active":true,"event_types":[],"property_ids":"<property_ids>","min_severity":"<min_severity>","enabled":true}),
});
console.log(await res.json());

DELETE/webhooks/{id}Write key, Pro

Delete a webhook endpoint and its subscription

Parameters of DELETE /webhooks/{id}
NameInTypeRequired
idpathstringyes

curl

curl -X DELETE -H "Authorization: Bearer $RANKPILOT_API_KEY" \
  "https://rank.hanzla.com/api/v1/webhooks/<property-id>"

Node

const res = await fetch("https://rank.hanzla.com/api/v1/webhooks/<property-id>", {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${process.env.RANKPILOT_API_KEY}`,
  },
});
console.log(await res.json());

POST/webhooks/{id}/testWrite key, Pro

Send a signed test event through the normal delivery path

Parameters of POST /webhooks/{id}/test
NameInTypeRequired
idpathstringyes

curl

curl -X POST -H "Authorization: Bearer $RANKPILOT_API_KEY" \
  "https://rank.hanzla.com/api/v1/webhooks/<property-id>/test"

Node

const res = await fetch("https://rank.hanzla.com/api/v1/webhooks/<property-id>/test", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.RANKPILOT_API_KEY}`,
  },
});
console.log(await res.json());

POST/webhooks/{id}/rotate-secretWrite key, Pro

New signing secret; the old one keeps signing for 24 hours

Parameters of POST /webhooks/{id}/rotate-secret
NameInTypeRequired
idpathstringyes

curl

curl -X POST -H "Authorization: Bearer $RANKPILOT_API_KEY" \
  "https://rank.hanzla.com/api/v1/webhooks/<property-id>/rotate-secret"

Node

const res = await fetch("https://rank.hanzla.com/api/v1/webhooks/<property-id>/rotate-secret", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.RANKPILOT_API_KEY}`,
  },
});
console.log(await res.json());

POST/webhooks/deliveries/{id}/replayWrite key, Pro

Send a stored delivery again (younger than 30 days), same delivery id, new timestamp

Parameters of POST /webhooks/deliveries/{id}/replay
NameInTypeRequired
idpathstringyes

curl

curl -X POST -H "Authorization: Bearer $RANKPILOT_API_KEY" \
  "https://rank.hanzla.com/api/v1/webhooks/deliveries/<property-id>/replay"

Node

const res = await fetch("https://rank.hanzla.com/api/v1/webhooks/deliveries/<property-id>/replay", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.RANKPILOT_API_KEY}`,
  },
});
console.log(await res.json());