Pro AI · Automation API

Build on top of PilotPoster

Create and manage campaigns, read your groups and saved targeting presets, and feed conversion data back in, all with a scoped API key. Pair it with signed webhooks to react to publish, failure, and outcome events in real time.

curl https://app.pilotposter.com/api/v1/campaigns \
  -H "Authorization: Bearer pp_live_xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "New listing just hit the market!",
    "scheduledTime": "2026-08-01T15:00:00Z",
    "groupList": [{ "id": "123456789", "name": "Local Buy & Sell" }],
    "sleepBetweenPosts": 10
  }'

Authentication

Every request needs an Authorization: Bearer <api key> header. Generate a key from Settings → API & Webhooks, choosing only the scopes it needs.

campaigns:read

List and read campaigns, groups, and targeting presets.

campaigns:write

Create, pause, and cancel campaigns.

outcomes:write

Submit conversion and lead events from your own systems.

Keys are shown once at creation, stored hashed, and can be revoked at any time. Each key is rate limited to 60 requests per minute.

Reference

Endpoints

Everything you need to drive campaigns from your own systems.

GET /api/v1/campaigns

List your campaigns, optionally filtered by status.

campaigns:read
POST /api/v1/campaigns

Create a new campaign, scheduled or paused as a draft.

campaigns:write
GET /api/v1/campaigns/:id

Get a single campaign's status and per-group results.

campaigns:read
POST /api/v1/campaigns/:id/pause

Pause a running or scheduled campaign.

campaigns:write
POST /api/v1/campaigns/:id/cancel

Cancel a campaign so it is never processed again.

campaigns:write
GET /api/v1/groups

List the Facebook groups you've connected.

campaigns:read
GET /api/v1/targeting-presets

List your saved targeting presets.

campaigns:read
POST /api/v1/outcomes

Submit a conversion or lead event from your own systems (e.g. a CRM).

outcomes:write
Real-time events

Signed, versioned webhooks

Point PilotPoster at your own endpoint from Settings → API & Webhooks and get a request for every event you subscribe to. Each request is signed with your account's secret and carries an explicit API version.

post.published

A post was successfully published to a specific group.

post.failed

A post failed to publish to a specific group.

campaign.completed

A campaign finished processing every targeted group.

campaign.failed

A campaign could not proceed and was marked failed.

outcome.recorded

A click or conversion was recorded against a tracked link.

extension.offline

Your Chrome extension has gone offline and posts may be delayed.

report.ready

A scheduled or requested report has finished generating.

approval.changed

An Auto AI post moved through the review queue (approved, edited, or skipped).

Verify the signature (Node.js)

const crypto = require("crypto");

function verifySignature(rawBody, signatureHeader, secret) {
  const expected = "sha256=" + crypto
    .createHmac("sha256", secret)
    .update(rawBody)
    .digest("hex");
  return crypto.timingSafeEqual(
    Buffer.from(expected),
    Buffer.from(signatureHeader)
  );
}
  • Failed deliveries retry up to 4 times with backoff
  • Every attempt is visible in your delivery log
  • Replay any past delivery manually from Settings
  • Rotate your signing secret at any time

Full reference

Need every field, error code, and example?

The full technical docs cover request and response schemas, error codes, and more endpoint examples in depth.

Open full docs
FAQ

Developer questions

More in the full FAQ.

Which plan includes the Automation API?

The Automation API and webhooks are included with Pro AI. Generate a scoped API key from Settings → API & Webhooks once you're on that plan.

What scopes are available?

campaigns:read, campaigns:write, and outcomes:write. Create a key with only the scopes your integration needs.

What are the rate limits?

Each API key is limited to 60 requests per minute. Requests over the limit get a 429 response; back off and retry.

How do I verify a webhook came from PilotPoster?

Every webhook request includes an X-PilotPoster-Signature header, an HMAC-SHA256 of the raw request body using your account's signing secret. Recompute it and compare before trusting the payload.

Do webhooks retry on failure?

Yes. A failed delivery is retried up to 4 times with backoff. Every attempt, successful or not, is visible in your delivery log, and you can replay any past delivery manually.

Where do I manage keys and the signing secret?

From your dashboard, under Settings → API & Webhooks. You can create and revoke API keys, rotate your webhook signing secret, send a test event, and review delivery logs there.

Plug PilotPoster into your own stack

Automation API and webhooks are included with Pro AI.

7-day refund Cancel anytime Setup in minutes