Skip to main content
Unified Comment to DM Automation API

Comment to DM Automation API

Auto-send a DM when someone comments a keyword on a post, with an optional public reply, all through one API.

  • Trigger a DM when a comment matches your keywords
  • Send an optional public reply under the comment
  • Target one specific post or every post on the account
  • Real-time delivery through managed webhooks, no App Review on your side
No credit card required.
POST https://api.postpeer.dev/v1/posts
{ "platforms": ["twitter", "linkedin"], "content": "Hello world!" }
Published
2 platforms
TwitterLinkedIn
All posts delivered
Scheduled
queue
12
Queued
847
Sent
Next: in 15 min
Platforms
connected
XLIFBTT
One API, every platform
DF

"I was up and running on six different platforms in under 30 minutes. Strongly recommend!"

David Flor, Founder at Darklight Interactive

Divanshu KhatterMarketing Manager at Sembark

"Couldn't figure out the official Pinterest API. PostPeer was smooth. Using it daily."

Divanshu Khatter, Marketing Manager at Sembark

Het TikawalaFounder at Kalizzle AI Studio

"Great integration experience. Jonathan ships fixes within hours. Mad respect for the speed."

Het Tikawala, Founder at Kalizzle AI Studio

Add Social Media to Your Product in Three Steps

Connect once, then publish, schedule, and read data through the same API.

01

Get Your API Key

Sign up and get your API key instantly. No sales calls or complicated setup.

02

Integrate in Minutes

Connect once to PostPeer to publish, schedule, analyze, manage comments, and handle messages.

03

Support Every Major Platform

Give your users access to major social platforms without building and maintaining each integration yourself.

New to PostPeer? Read the getting started guide

One Request. Structured Response.

Clean, predictable JSON that's easy to parse and integrate.

POSTRequest
curl -X POST "https://api.postpeer.dev/v1/comment-automations/" \
  -H "x-access-key: YOUR_ACCESS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "accountId": "INTEGRATION_ID",
    "name": "Link in DM",
    "postScope": "specific",
    "platformPostId": "17901234567890123",
    "keywords": ["link", "guide"],
    "matchMode": "word",
    "publicReplies": ["Sent you a DM!"],
    "dmMessage": "Here is the link you asked for: https://example.com"
  }'
JSONResponse
{
  "success": true,
  "automation": {
    "id": "AUTOMATION_ID",
    "platform": "instagram",
    "name": "Link in DM",
    "status": "active",
    "trigger": {
      "postScope": "specific",
      "platformPostId": "17901234567890123",
      "keywords": ["link", "guide"],
      "matchMode": "word",
      "excludeKeywords": []
    },
    "actions": {
      "publicReplies": ["Sent you a DM!"],
      "dmMessage": "Here is the link you asked for: https://example.com"
    }
  }
}

Why Choose PostPeer

Build the comment-to-DM automation your users need while PostPeer handles the platform-specific complexity behind it.

Keyword-Triggered DMs

Set trigger words like `link` or `guide`. When a new comment matches, PostPeer automatically sends the commenter your DM. Leave keywords empty to reply to every new comment.

Optional Public Reply

Post a public reply under the comment too, such as "Sent you a DM!". Add up to five alternatives and PostPeer rotates one per comment so the automation doesn't read as a bot.

Any Post or a Specific Post

Run an automation across every post on the account, or bind it to one specific post or reel by its ID. Fetch eligible posts straight from the API.

Match Modes and Exclusions

Match a keyword as a whole word, anywhere in the text, or as the exact comment. Add exclude words to skip comments that should never trigger a DM.

Managed Webhooks and Delivery

PostPeer subscribes the account to comment webhooks and delivers in real time with automatic retries. You never run a webhook server or file your own Meta App Review.

Logs and Stats

Every trigger is logged with the comment, the commenter, and whether the DM and public reply were sent. Track triggered, succeeded, and failed counts per automation.

Automate Comment to DM Across Supported Platforms via One API

Set up keyword-triggered DM automations through one API while PostPeer manages the webhooks, permissions, and delivery behind each supported platform.

One Integration. Every Way to Build.

Start with REST, use a typed SDK, connect an automation workflow, or hand the job to an agent. The same PostPeer API powers every path.

01

REST API

One predictable endpoint for every supported platform. Connect accounts once, then publish everywhere.

02

Typed, drop-in Node.js and Python clients generated from the same API contract.

03

No-Code Automation

Build social publishing and scheduling workflows without creating a custom backend.

04

AI Agents & MCP

Give Claude, Cursor, Codex or your own agent access through hosted MCP, Agent Skills or REST tool calling.

publish.js
const response = await fetch(
  'https://api.postpeer.dev/v1/posts',
  {
    method: 'POST',
    headers: {
      'x-access-key': process.env.POSTPEER_API_KEY,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      content: 'Hello from PostPeer!',
      platforms: [
        { platform: 'twitter', accountId: 'acc_twitter' },
        { platform: 'linkedin', accountId: 'acc_linkedin' },
      ],
      publishNow: true,
    }),
  },
);

const post = await response.json();
One request · Twitter + LinkedIn

Frequently Asked Questions

Power Your Next Project With a Unified Social Media API

Give your users posting, scheduling, analytics, and engagement features through one API your team can maintain.

Start with 20 free credits. No credit card required.