Reddit APIReddit DMREST APITutorialPRAW Alternative

How to Send a Reddit DM via REST API in 2026 (with Code)

Send Reddit DMs via REST API. Bearer token, JSON body, $0.025 per call. Working code in curl, Python, and Node.js. PRAW alternative for AI agents.

RedditAPI··Updated May 28, 2026
Reddit DM API tutorial showing a bearer-token REST request with code in curl, Python, and Node.js

To send a Reddit DM via REST API, first call POST /api/reddit/login once to get your Reddit session cookies, then POST to https://api.redditapis.com/api/reddit/dm with a JSON body of {to_username, message, reddit_session, loid, csrf_token} and an Authorization: Bearer <key> header. Each DM costs $0.025 (the login is $0.012 and its cookies are reusable across many sends). Sign up for a $0.50 free credit. No developer-app review, no OAuth dance, no 4-week approval queue.

This guide covers the two distinct Reddit DM surfaces, working code in three languages, the full error table, deliverability rules, and how to wire the endpoint as a tool for an AI agent or MCP server. Every claim links to its source.

The Two Reddit DM Surfaces and Why the Difference Matters

Reddit has two distinct direct-message surfaces. Mixing them up is the number one reason developer DM scripts return INVALID_USER or 400 missing field. The active r/redditdev thread "Are the new API endpoints for chat available yet?" walks through this confusion in detail.

r/redditdev·u/mgsecure

Are the new API endpoints for chat available yet?

00
Open on Reddit

Reddit DM surfaces comparison: Legacy PM vs Chat DM side-by-side with endpoint, auth, and PRAW support details

Legacy private message: Subject plus body, persisted. Endpoint is POST /api/compose (OAuth, privatemessages scope). Lands in the Inbox under "Messages". PRAW supports it via redditor.message(subject, body).

Reddit chat DM: Real-time, subjectless. Internal websocket endpoint, not part of the documented OAuth API (Reddit Data API surface). Lands in the Chat panel. PRAW has no chat support, as documented in the r/redditdev "Chat API" thread.

The third-party redditapis.com REST endpoint targets the chat DM surface. That is the surface most 2026 outreach, lead-gen, and AI-agent workflows want, because it is what real Reddit users now reach for first. Legacy PMs still work but they sit in a less-checked inbox.

If you need the legacy PM specifically, for compliance archives, ToS-bound communication, or audit trails, use PRAW or the official Reddit Developer Platform directly. For everything else, the REST path below is faster to ship and cheaper to operate.

Three Paths to Send a Reddit DM

Three realistic options exist for sending Reddit DMs programmatically in 2026: PRAW with Reddit OAuth for personal scripts, the Reddit Commercial Data API for enterprises with existing procurement agreements, and a managed REST proxy for teams that need write-scope access in minutes instead of weeks. Each option has a different setup path, cost structure, and target use case worth understanding before you write a line of code.

PRAW with Reddit OAuth: Your real Reddit account, privatemessages scope from Reddit's OAuth2 authorization, 30 minutes of setup for personal use, then 2-4 weeks if commercial. Zero cost per DM for personal account use. Best for personal scripts and academic research.

Reddit Commercial Data API: App review plus a commercial agreement with Reddit. Two to four weeks approval time. Bundled into the $12,000-per-year minimum via Reddit's Data API terms. Best for enterprises that have already cleared procurement. The r/redditdev community has been actively discussing this tradeoff since the November 2025 Responsible Builder Policy tightening.

redditapis.com REST: Bearer token plus your own Reddit session. Thirty seconds, signup only. $0.025 per DM. Best for AI agents, outreach pipelines, and indie products. This is what the rest of this guide covers.

See the alternatives page for the full matrix and the cost calculator for a plug-in-your-volume estimate.

Quick Start: Send Your First Reddit DM in 60 Seconds

The fastest path to a working Reddit DM is two curl commands: log in once to get your Reddit session cookies, then send the DM with those cookies in the body. Sign up at /signup, copy your API key from the dashboard, and run the two commands below. A 200 response with the room_id and event_id confirms the DM was delivered.

# Step 1 , log in once and read the three session cookies from the response
curl -X POST https://api.redditapis.com/api/reddit/login \
  -H "Authorization: Bearer $REDDITAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"username":"YOUR_REDDIT_USER","password":"YOUR_REDDIT_PASS","method":"browser"}'
# -> {"success": true, "cookies": {"reddit_session": "...", "loid": "...", "csrf_token": "...", ...}}

# Step 2 , send the DM, pasting the three cookies from Step 1 into the body
curl -X POST https://api.redditapis.com/api/reddit/dm \
  -H "Authorization: Bearer $REDDITAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to_username": "spez",
    "message": "Sent via redditapis.com in one HTTP call.",
    "reddit_session": "eyJhbGc...",
    "loid": "000000...",
    "csrf_token": "1c0819..."
  }'

You will see a 200 response with room_id and event_id. The DM body needs the recipient (to_username, or to_user_t2 to skip the username lookup), the message text, and the three session cookies; without any one of them the endpoint returns 400. The full endpoint reference lives at docs.redditapis.com/docs/dm/dm, and the login flow that returns those cookies is at docs.redditapis.com/docs/auth/login.

Reddit DM request body compared: the legacy to/subject/text body returns 400, while the current to_username/message body with three session cookies returns a delivered 200

Authentication: How the Two-Credential Stack Works

Every request to the DM endpoint requires two independent credential layers. The first is your redditapis.com bearer token, which identifies your account as a paying API customer. The second is a Reddit session credential set (cookies, loid, CSRF token) that authorizes the actual message delivery on Reddit's side. Missing either layer produces a 401 or a chat-surface delivery failure, so understanding the separation before writing production code saves a lot of debugging time.

Reddit DM API two-credential architecture: Layer 1 bearer token + Layer 2 Reddit session cookies producing delivered DM

Layer 1: redditapis.com bearer token. Sign up at /signup, generate an API key, set Authorization: Bearer <key> on every request. This proves the request comes from a paying redditapis.com account. The key never expires unless you rotate it.

Layer 2: Reddit-side session. The chat DM endpoint needs a logged-in Reddit user session to actually deliver. You authenticate once via POST /api/reddit/login (see docs.redditapis.com/docs/auth/login) with a username, password, and optional 2FA token. The response returns the cookies, loid, and CSRF token your DM calls then include in the body. You bring the Reddit credentials; redditapis.com handles the cookie machinery so you do not have to parse session headers yourself.

This is the customer-brings-own-credentials model. The customer is the user-of-record on Reddit's side; redditapis.com is the REST broker. No Reddit accounts are stored on redditapis.com infrastructure.

Reddit DM auth flow: login once to get session cookies, reuse across all DM calls, re-login on 401 or after 24h

Body format note for the login call: POST /api/reddit/login body is Content-Type: application/json. Pass username and password as flat, top-level JSON fields. This is a common mistake for developers used to Reddit's native /api/login endpoint, which is form-encoded. The redditapis.com login endpoint is JSON only.

Session lifetime: There is no token-refresh endpoint. When a session expires, re-call POST /api/reddit/login to get fresh cookies. Treat 24 hours as a safe ceiling for production scripts. Pre-emptively re-login before long-running batches rather than waiting for a 401.

import os
import requests

API_KEY = os.environ["REDDITAPI_KEY"]
BASE = "https://api.redditapis.com"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}

def get_reddit_session(username: str, password: str) -> dict:
    """
    Authenticate a Reddit account via POST /api/reddit/login.
    Body is JSON (NOT form-encoded). Returns session cookies.
    Cost: $0.012 per call.
    """
    r = requests.post(
        f"{BASE}/api/reddit/login",
        json={
            "username": username,
            "password": password,
            # Optional: "totp_secret": "YOUR_2FA_SECRET" for 2FA accounts
        },
        headers=HEADERS,
    )
    r.raise_for_status()
    data = r.json()
    cookies = data["cookies"]
    return {
        "reddit_session": cookies["reddit_session"],
        "loid": cookies["loid"],
        "csrf_token": cookies["csrf_token"],
    }

session = get_reddit_session(
    username=os.environ["REDDIT_USERNAME"],
    password=os.environ["REDDIT_PASSWORD"],
)
print("Authenticated. Session cookies retrieved.")

Credential security model: When you call POST /api/reddit/login, your Reddit username and password travel to redditapis.com's servers over HTTPS. redditapis.com authenticates to Reddit on your behalf and returns the resulting session cookies. Your password is not stored or logged by redditapis.com; only the session cookies are returned. Full details at docs.redditapis.com/docs/auth/login.

Start building with RedditAPI

Reads $0.002, votes $0.005, writes $0.012, DMs $0.025. $0.50 free credits.

Code in Three Languages

The DM endpoint accepts any HTTP client that can POST JSON with a bearer-auth header, so the implementation is nearly identical across languages. Each example threads the same three session cookies (reddit_session, loid, csrf_token) from the login call above into the DM body, targets the recipient with to_username, and puts the text in message. Below are working examples in Python with requests, Node.js with native fetch, and bash with curl. Each surfaces the room_id from the 200 response.

The three-step Reddit DM send flow: log in once for session cookies, read reddit_session, loid, and csrf_token from the response, then POST the DM with to_username and message

Python with requests

import os
import requests

API_KEY = os.environ["REDDITAPI_KEY"]
BASE = "https://api.redditapis.com"

# `session` is the dict returned by get_reddit_session() in the auth section above:
# {"reddit_session": "...", "loid": "...", "csrf_token": "..."}

def send_reddit_dm(session: dict, to_username: str, message: str):
    response = requests.post(
        f"{BASE}/api/reddit/dm",
        json={
            "to_username": to_username,
            "message": message,
            "reddit_session": session["reddit_session"],
            "loid": session["loid"],
            "csrf_token": session["csrf_token"],
        },
        headers={"Authorization": f"Bearer {API_KEY}"},
        timeout=15,
    )
    response.raise_for_status()
    return response.json()

result = send_reddit_dm(session, "spez", "Sent from Python.")
print(result)  # -> {"success": True, "to": "t2_...", "room_id": "!...", "event_id": "$..."}

Node.js with fetch

// `session` is { reddit_session, loid, csrf_token } from the login call above.
const send_reddit_dm = async (session, toUsername, message) => {
  const response = await fetch("https://api.redditapis.com/api/reddit/dm", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.REDDITAPI_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      to_username: toUsername,
      message,
      reddit_session: session.reddit_session,
      loid: session.loid,
      csrf_token: session.csrf_token,
    }),
  });
  if (!response.ok) throw new Error(`HTTP ${response.status}`);
  return response.json();
};

const result = await send_reddit_dm(session, "spez", "Sent from Node.");
console.log(result);

curl in a bash loop

# Export the three cookies from the Step 1 login response first:
#   export REDDIT_SESSION="eyJhbGc..." LOID="000000..." CSRF="1c0819..."
for handle in alice bob carol; do
  curl -s -X POST https://api.redditapis.com/api/reddit/dm \
    -H "Authorization: Bearer $REDDITAPI_KEY" \
    -H "Content-Type: application/json" \
    -d "{\"to_username\":\"$handle\",\"message\":\"Hi $handle, sent via API.\",\"reddit_session\":\"$REDDIT_SESSION\",\"loid\":\"$LOID\",\"csrf_token\":\"$CSRF\"}"
  sleep 30
done

The 30-second spacing is deliverability hygiene, not a rate-limit requirement. See the deliverability section below.

For the full Python pipeline covering posts, comments, search, and DMs in one script, see /blogs/reddit-api-python-tutorial.

Pricing: What Each Reddit DM Actually Costs

The DM endpoint is $0.025 per call. The login precondition is $0.012 per call. Session cookies can be cached and reused across many DM calls, so the login cost amortizes significantly at volume.

Reddit DM API pricing breakdown: cost per DM at 100, 500, and 1000 scale with stat pills for free credit and no annual commitment

Here is how the math scales at common volumes (per-call pricing):

  • 100 DMs (1 login): $2.51 ($0.012 login + 100 x $0.025)
  • 500 DMs (1 login): $12.51 ($0.012 + 500 x $0.025)
  • 1,000 DMs (1 login): $25.01 ($0.012 + 1,000 x $0.025)
  • Free credit at signup: $0.50 covers your first 19 DMs including the login call (pricing)

A 1,000-DM campaign costs $25.01 in API fees. Compare this to the Reddit Commercial Data API at $12,000 per year minimum, which requires a commercial agreement via Reddit's Data API terms. There is no $12,000-per-year floor and no annual commitment on redditapis.com. You pay for what you call.

The interactive calculator at /reddit-api-cost-calculator does the math for your exact mix of reads, comments, votes, and DMs. Credits never expire. The $0.50 free credit at /signup requires no credit card. Full endpoint pricing lives at /pricing.

Why Reddit DM Access Got Harder in 2026

The reason a third-party REST path for Reddit DMs exists at all traces back to Reddit's 2023 API repricing. Apollo founder Christian Selig posted the call notes after Reddit set the new rate at $12,000 per 50 million requests. Apollo, which ran 7 billion requests per month, was looking at approximately $20 million per year. The post was viewed over a million times. Apollo shut down on June 30, 2023. The pricing stayed.

Christian Selig

Christian Selig

@ChristianSelig

Just got off a call with Reddit about the API and new pricing. Bad news unless I come up with 20 million dollars (not joking). Appreciate boosts. https://t.co/FliuNCinpZ

Since then, write-scope developer app approval has been inconsistently available. What developers report about the write-scope review process as of 2026:

  • Multi-week wait times for app approval in many cases
  • Unclear rejection criteria with no documented appeal path
  • Approval processes that stall without explanation or status update
  • The $12,000-per-year minimum (Reddit's Data API terms) once approved for commercial use

As of March 31, 2026, Reddit introduced the "App" label for accounts using allowed automation. Reddit's announcement on r/redditdev confirmed: accounts that use automation in allowed ways will carry a visible "app" label. This is a formal recognition that programmatic Reddit use is legitimate when it proxies real user intent. See the Reddit Developer Platform docs for the official API reference.

The practical consequence for developers who need DM access in 2026 and want to ship in days rather than weeks: the OAuth app review path is not reliable. A managed REST proxy that handles Reddit session auth internally is the alternative that gets you from account creation to a working DM call in under three minutes. See /reddit-api-alternatives for the full comparison.

For the full rate-limit context, including what Reddit enforces at the per-account and per-endpoint layer, see /blogs/reddit-api-rate-limits-2026.

Error Codes You Will Hit and How to Handle Each

Most Reddit DM API errors fall into deterministic buckets with clear fixes. The most common is 502 INVALID_USER, which fires when the recipient account does not exist, has blocked DMs, or restricts messages to friends only. The second most common is 400, which means a required field is missing from the request body. Both are safe to skip-and-log without retrying. Identify the HTTP status code from the response, then apply the fix shown in the table below.

Reddit DM API error decision flow: 400 body validation, 401 bad auth header, 403 invalid token, 429 pacing window, 502 INVALID_USER and BAD_GATEWAY paths

The error you will hit most often is 502 INVALID_USER, which means the recipient does not exist, has blocked the sender, or restricts DMs to friends only. Skip the recipient, log the skip, and move on. The second most common is 400, which means a required field is missing from the request body.

  • 400: Missing message, no recipient (to_username or to_user_t2), or a missing session cookie (reddit_session, loid, csrf_token). The endpoint returns {"error":"message required"} or {"error":"missing required cookies: reddit_session, loid, csrf_token"}; validate the request body before sending.
  • 401: Missing or malformed Authorization header. Check Authorization: Bearer <key> is set.
  • 403: Invalid or revoked bearer token. Rotate the key in the dashboard.
  • 429 RATELIMIT: Per-account pacing limit. Pause the loop, let the pacing window reset. Do NOT retry immediately.
  • 502 INVALID_USER: Recipient does not exist, blocked you, or restricts DMs. Skip the recipient.
  • 502 BAD_GATEWAY: Upstream Reddit timeout. Safe to retry with exponential backoff, as no DM was delivered.
  • 500: Generic server error. Retry once, then escalate.

A 429 is not retry-without-changes territory. Pause the loop entirely and let the per-account pacing window reset before resuming. For 429 pacing context and per-account limits, read /blogs/reddit-api-rate-limits-2026 before running any batch job.

The full error reference including edge cases lives at docs.redditapis.com/docs/dm/dm.

Deliverability: Warm Accounts, Karma, and Rate Limits

A few characteristics consistently separate accounts that send reliably from accounts that do not. Treat this as a positive checklist for account quality, not as a gaming guide. The full operational playbook lives in the DM endpoint reference for logged-in customers.

Reddit DM deliverability signals: five factors that determine whether accounts send reliably in 2026

Real participation history. Accounts that have been used as accounts, commenting, voting, subscribing to subreddits, occasionally posting, send reliably. The history does not need to be huge; it does need to be real.

Healthy karma mix. Accounts with both comment karma and link karma read as participating members of communities. Either alone is thinner signal.

Varied message bodies. A template with several spintax slots, or per-recipient text from a small language model, works far better than identical bodies across many sends. A mid-tier LLM can rewrite the same 80-word pitch into hundreds of unique variants in under a minute.

Sensible pacing. Match the rhythm of an active human account. The 30-second spacing in the bash loop example above is a deliverability choice, not a rate-limit requirement. The endpoint-specific pacing recommendations live at docs.redditapis.com/docs/dm/dm.

Context-match the recipient. Pitching a crypto product to r/PowerWashingPorn subscribers reads as off-context. A simple recipient classifier using the last few subreddits the person commented in keeps your outreach landing in front of people who are actually interested.

The canonical r/redditdev conversation on DM compliance is worth reading before any commercial workload:

"Is it safe to send DMs via Reddit API to users who opt-in? I have a list of users who explicitly subscribed to receive updates, and I want to know if there's a clean ToS-compliant way to do this at any kind of volume."

Read the full thread on r/redditdev: "Is it safe to send DMs via Reddit API to users who opt-in" for the community answers on opt-in lists, suppression files, and pacing recommendations.

The earlier r/redditdev thread "How to send private message usage Reddit API" covers the PRAW-specific failure modes for the same workflow.

The community consensus across those threads: opt-in delivery against an audience that asked to hear from you is consistently the highest-ROI shape.

The redditapis.com REST endpoint is a credential broker. Compliance with Reddit's User Agreement and platform policy lives with you, the customer. RedditAPI is an independent third-party service and is not affiliated with Reddit, Inc.

The cheapest Reddit API. Try it free.

Reads from $0.002 per call. $0.50 free credits. No credit card required.

Production Patterns: Batch Send with Exponential Backoff

A production Reddit DM pipeline needs to handle two realities that do not show up in single-call tests: Reddit-side session cookies expire after roughly 24 hours, and Reddit's upstream servers occasionally return transient 5xx errors that are safe to retry once or twice. The pattern below addresses both with explicit backoff on retriable errors and a hard pause on 429, so a batch job does not silently drop messages or burn through the pacing window.

import os
import time
import requests
from requests.exceptions import HTTPError

API_KEY = os.environ["REDDITAPI_KEY"]
BASE = "https://api.redditapis.com"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}

# `session` is the { reddit_session, loid, csrf_token } dict from the login call.
def send_with_retry(session: dict, to_username: str, message: str, max_retries: int = 3):
    for attempt in range(max_retries):
        try:
            response = requests.post(
                f"{BASE}/api/reddit/dm",
                json={
                    "to_username": to_username,
                    "message": message,
                    "reddit_session": session["reddit_session"],
                    "loid": session["loid"],
                    "csrf_token": session["csrf_token"],
                },
                headers=HEADERS,
                timeout=15,
            )
            response.raise_for_status()
            return response.json()
        except HTTPError as e:
            status = e.response.status_code
            if status in (502, 503, 504) and attempt < max_retries - 1:
                time.sleep(2 ** attempt)
                continue
            if status == 429:
                # Pacing window hit. Pause and let it reset before resuming.
                raise
            raise

recipients = [("alice", "Hi alice"), ("bob", "Hi bob"), ("carol", "Hi carol")]
for handle, body in recipients:
    try:
        send_with_retry(session, handle, body)
        time.sleep(30)  # deliverability spacing
    except HTTPError as e:
        print(f"skipped {handle}: {e.response.status_code}")

Three patterns to internalize: backoff only on 5xx transient errors, never retry on 429 (pause and let the pacing window reset), and space deliverability-sensitive calls comfortably apart.

Checking your credit balance before a batch run:

# IMPORTANT: /account/me is root-level - NOT under /api/reddit/
r = requests.get(
    "https://api.redditapis.com/account/me",
    headers=HEADERS,
)
data = r.json()
print(f"Credits remaining: {data['credits_remaining']}")

For additional production patterns including async batching, corpus logging, and cost tracking across mixed workloads, see /blogs/reddit-api-python-tutorial.

Sending Reddit DMs from an AI Agent or MCP Server in 2026

The REST shape of POST /api/reddit/dm maps directly to an MCP tool definition. This is one of the cleanest integrations available on any Reddit-adjacent API: the model only needs to supply two fields (to_username and message), while your executor injects the three session cookies from login so the credentials never enter the model's context.

Reddit DM API MCP tool definition with compatible runtimes: Anthropic, OpenAI, Vercel AI SDK, LangChain, MCP server

{
  "name": "send_reddit_dm",
  "description": "Send a chat DM to a Reddit user. Cost: $0.025 per call.",
  "input_schema": {
    "type": "object",
    "properties": {
      "to_username": {
        "type": "string",
        "description": "Recipient Reddit username, no u/ prefix"
      },
      "message": { "type": "string", "description": "Message body, plain text" }
    },
    "required": ["to_username", "message"]
  }
}

The reddit_session, loid, and csrf_token cookies are deliberately absent from the schema: the agent should never handle credentials. Your executor holds the cached session and merges those three fields into the request body before it calls the endpoint.

Wire that into the Anthropic tool-use API, the OpenAI function-calling API, the Vercel AI SDK, or any LangChain agent and the model can send DMs the same way it calls any other tool. Pair it with send_reddit_comment (see docs.redditapis.com/docs/write/comment) and get_subreddit_posts and you have a complete read-write-respond agent surface for Reddit, billed per call.

The Model Context Protocol fundamentals are covered in the Anthropic engineering team's MCP overview, which is the canonical pattern for wiring any HTTP endpoint into a Claude-driven agent loop:

A concrete Anthropic tool-use call site looks like this:

import os, anthropic, requests

API_KEY = os.environ["REDDITAPI_KEY"]

# SESSION = get_reddit_session(...) -> { reddit_session, loid, csrf_token }
# Held by your executor, never exposed to the model.
def execute_send_reddit_dm(args: dict, session: dict) -> dict:
    r = requests.post(
        "https://api.redditapis.com/api/reddit/dm",
        json={
            "to_username": args["to_username"],
            "message": args["message"],
            "reddit_session": session["reddit_session"],
            "loid": session["loid"],
            "csrf_token": session["csrf_token"],
        },
        headers={"Authorization": f"Bearer {API_KEY}"},
    )
    return r.json() if r.ok else {"error": r.text, "status": r.status_code}

client = anthropic.Anthropic()
response = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=1024,
    tools=[{"name": "send_reddit_dm", "description": "Send a Reddit chat DM. $0.025 per call.",
            "input_schema": {"type": "object", "properties": {
                "to_username": {"type": "string"}, "message": {"type": "string"}},
                "required": ["to_username", "message"]}}],
    messages=[{"role": "user", "content": "DM u/spez a thank-you for the API."}],
)
# Inspect response.content for tool_use blocks, run execute_send_reddit_dm(block.input, SESSION), return tool_result

The same shape ports to OpenAI's function-calling, the Vercel AI SDK, LangChain's Tool interface, and any MCP server that exposes a tools/call handler. Budget your agent's per-task cost by counting tool invocations (pricing): 10 DMs equals $0.25, 100 DMs equals $2.50, 1,000 DMs equals $25.

The r/redditdev community has been working through the same pattern for PRAW users:

"Send messages to chat with reddit praw, has anyone figured out the bridge from PRAW's legacy message API to the new chat surface? Trying to wire this into an agent."

See the r/redditdev thread "Send messages to chat with reddit praw" for the community attempts, and the r/SaaS "Automated Hyper-personalized DMs on Reddit" thread for a builder shipping the agent end-to-end.

For accepted-answer-on-record on the underlying Reddit-API DM mechanics, the canonical Stack Overflow Q&A "Can the REDDIT Api be used to send a PM to another user" carries the legacy-PM details.

This pairs naturally with /blogs/reddit-api-python-tutorial, which covers the read endpoints the same agent will need for fetching user data before sending.

Reddit DM API Use Cases in Production

The DM endpoint covers four distinct production patterns, all operating from a single Reddit account per customer. Each pattern combines the DM call with at least one read endpoint to match message content to recipient context, which is what separates effective pipelines from accounts that get flagged for spam on day one.

Lead generation and opt-in outreach: The highest-ROI DM pattern in 2026. A user comments in a relevant subreddit expressing interest in your product category. Your monitoring script detects the mention, classifies the intent, and queues a personalized DM. Delivery goes to the Chat panel, which users check far more frequently than the legacy PM inbox.

A solo builder shared how this use case maps to an actual product shipping today:

Jacob Rhodes

Jacob Rhodes

@Jacob_Rhodes_

I'm 16, and I'm looking for a mentor. Just trying to figure out this SaaS thing. I'm a solo founder building OnPilot, an AI marketing tool that monitors Reddit and X for buyer, intent signals and drafts outreach replies for human approval. I'm self taught. I don't know how to

Community management: Moderators build tools that send a welcome DM automatically when a user joins a community, or follow up with a user after a high-quality comment. The DM endpoint combined with docs.redditapis.com/docs/dm/dm-threads to list existing conversations lets you build a complete inbox management layer.

AI agent read-write-respond loops: An agent reads subreddit posts via GET /api/reddit/posts, evaluates the content for relevance, and sends a contextual DM to the author when there is a genuine product fit. Budget $0.025 per DM sent plus $0.002 per post read (pricing). A 100-post scan that results in 5 DMs costs approximately $0.21 total.

Developer notification pipelines: A product that monitors Reddit for brand mentions can close the loop by DM-ing the mentioning user directly. The vote endpoint (see /blogs/reddit-vote-api-tutorial-2026) completes the engagement: upvote the comment, then DM the author.

For the full use-case coverage across all 14 production workloads: /reddit-api-usecases.

Migrating from PRAW

If you already have a PRAW-based script using redditor.message(subject, body), the migration requires replacing roughly 10 lines of PRAW boilerplate with a single requests.post call. The important difference is surface: PRAW targets the legacy private-message inbox via the OAuth /api/compose endpoint, while the REST path targets the Reddit chat DM surface. These are separate inboxes on Reddit's side, so pick the one that matches where your recipients actually check messages.

PRAW to redditapis.com migration: before showing PRAW OAuth setup, after showing clean REST call in 5 lines

Replace this:

import praw
reddit = praw.Reddit(client_id="...", client_secret="...", username="...", password="...", user_agent="...")
reddit.redditor("spez").message(subject="Hi", message="Sent from PRAW.")

with this (where session is the { reddit_session, loid, csrf_token } dict from the login call):

import os, requests
requests.post(
    "https://api.redditapis.com/api/reddit/dm",
    json={
        "to_username": "spez",
        "message": "Sent from REST.",
        "reddit_session": session["reddit_session"],
        "loid": session["loid"],
        "csrf_token": session["csrf_token"],
    },
    headers={"Authorization": f"Bearer {os.environ['REDDITAPI_KEY']}"},
)

PRAW handles the legacy PM endpoint. The REST endpoint handles the chat DM. If you genuinely need both surfaces in one workflow, run both in parallel, since they are different message types landing in different Reddit-side inboxes.

The PRAW migration is covered in more detail in /blogs/reddit-api-python-tutorial, which walks through replacing PRAW for reads, comments, search, and DMs in a single unified REST pipeline.

For a side-by-side comparison of the two approaches across setup time, cost, and supported use cases, see /blogs/reddit-data-api-rest-vs-praw-2026.

Where to Go Next

The references below cover the full request and response shape for each endpoint used in this guide, plus related tutorials for read workloads, rate-limit context, and cost modeling at volume. Each link resolves to either the redditapis.com documentation or a related guide that expands on a specific workflow covered above.

Sign up at /signup for a $0.50 free credit. From there, every $1 in credit covers 40 DMs at the current $0.025 rate. Credits never expire.

Frequently asked questions.

Yes, two paths exist. The legacy path is the OAuth-based /api/compose endpoint, which sends a subject and body private message into the Reddit inbox. PRAW wraps this via redditor.message(subject, body). The newer path is the Reddit chat DM, which the legacy endpoint does not produce. To send a chat DM via REST you can use redditapis.com /api/reddit/dm at $0.025 per call. [Sign up at /signup](/signup) for a $0.50 free credit with no developer-app review required.

Reddit's general API ceiling is roughly 100 queries per minute for OAuth-authenticated apps. The DM-specific limit is stricter and not officially documented. Pacing recommendations live in our [DM endpoint reference](https://docs.redditapis.com/docs/dm/dm). redditapis.com does not add its own per-minute cap. See [/blogs/reddit-api-rate-limits-2026](/blogs/reddit-api-rate-limits-2026) for the full rate-limit context.

Yes. The REST shape of POST /api/reddit/dm maps cleanly to an MCP tool definition. A tool named send_reddit_dm with input schema {to_username, message} gives an agent direct send capability from Claude, OpenAI, Vercel AI SDK, and LangChain; your executor injects the reddit_session, loid, and csrf_token cookies (from POST /api/reddit/login) so the model only supplies the recipient and the text. See [docs.redditapis.com/docs/dm/dm](https://docs.redditapis.com/docs/dm/dm) and [/signup](/signup) to get your API key.

Three options: PRAW for small-volume sends where you operate your own credential pool; redditapis.com at $0.025 per DM for medium-volume REST-shape sends; Apify for high-volume sends with residential proxies bundled. Use [/reddit-api-cost-calculator](/reddit-api-cost-calculator) to model your volume and pick the right tier.

Three things matter most: real activity history before sending, varied message bodies (spintax or per-recipient LLM text), and recipients matched to context via subreddit history. The [DM endpoint reference at docs.redditapis.com/docs/dm/dm](https://docs.redditapis.com/docs/dm/dm) has the full deliverability playbook. See [/reddit-api-alternatives](/reddit-api-alternatives) for the comparison.

Replace reddit.redditor().message() with requests.post() to https://api.redditapis.com/api/reddit/dm with JSON body {to_username, message, reddit_session, loid, csrf_token} and an Authorization: Bearer header, where the three cookies come from POST /api/reddit/login. PRAW targets the legacy PM inbox; REST targets Chat DM. See [/blogs/reddit-api-python-tutorial](/blogs/reddit-api-python-tutorial) for the full Python setup and [/reddit-api-alternatives](/reddit-api-alternatives) for the side-by-side comparison.

Reddit's June 2023 API repricing set the commercial tier at $12,000 per year minimum. Apollo shut down June 30, 2023 after facing $20M/year in API fees. Since then, write-scope developer app approval has multi-week documented delays. Managed REST proxies like redditapis.com offer immediate write-scope access at pay-per-call pricing. See [/reddit-api-alternatives](/reddit-api-alternatives) for the full comparison and [/pricing](/pricing) for current rates.

Keep reading.

Continue exploring related pages.

Get a Reddit API key

Instant bearer token, no waitlist and no enterprise contract.

Reddit API use cases

14 use cases from AI training to brand monitoring and DMs.

Reddit Search API

Search posts, comments, users, and communities over one REST endpoint.

Reddit MCP server

Wrap the REST API as MCP tools for Claude, Cursor, and any MCP client.

Reddit API for AI agents

Live Reddit context for tool calls, MCP servers, and RAG pipelines.

RedditAPI pricing

Endpoint-level costs and quick monthly totals - reads from $0.002 / call.

Reddit API cost calculator

Estimate monthly spend using your request volume.

Reddit API guides and tutorials

Tutorials, walkthroughs, and API deep-dives for developers.

Reddit API alternatives

Evaluate alternatives by cost model, limits, and integration fit.

Official Reddit API vs RedditAPI

Access, setup, rate limits, and pricing, side by side.

Affiliate program

Earn 20% lifetime commissions - capped at $5,000/yr.

Reddit Vote API tutorial

Upvote and downvote a post programmatically via the REST API.

Reddit Data API: REST, no PRAW

REST endpoints for Reddit data with no PRAW and no OAuth dance.

Reddit scraping benchmarks

Real throughput, error rates, and cost benchmarks for Reddit scraping.

Reddit API answers

Direct answers on cost, access, rate limits, endpoints, and auth.

How much the Reddit API costs

Per-call pricing from $0.002 a read, with $0.50 in free credits.

Reddit API in Python

One requests call with a bearer token, no PRAW and no OAuth flow.

Reddit shadowban checker

Check if a Reddit account is shadowbanned in seconds, free and no login.

Similar reads.

More guides on the Reddit API, scraping, pricing, and MCP servers.

PRAW vs Reddit REST API 2026: a developer choosing between PRAW and a third-party REST bearer-token path, redditapis.com is an independent third-party not affiliated with Reddit Inc
PRAWPRAW Alternative

PRAW vs Reddit REST API in 2026: When to Switch

A decision matrix for moving off PRAW to a REST plus bearer-token model. Feature parity, a field-name map, a one-hour migration plan, and the cost crossover point.

RedditAPI·
Editorial-surreal silhouette reaching upward through layered organic ribbons toward a node of light, glassmorphism title panel
Reddit APIReddit Vote API

Reddit Vote API: Upvote and Downvote a Post Programmatically (2026)

How to call POST /api/reddit/vote in 2026: auth via login, thing_id format (t3_ for posts, t1_ for comments), direction up/down/none, error handling, and how the no-OAuth REST path differs from PRAW.

RedditAPI·
Reddit Data API 2026 cover: surreal editorial illustration with magnifying glass over crystalline data structures in orange and deep blue, redditapis.com not affiliated with Reddit Inc
Reddit APIReddit Data API

Reddit Data API in 2026: REST Endpoints, No PRAW, No OAuth

Pull Reddit posts at $0.002 per call with a third-party REST API. Bearer token, no PRAW, no OAuth flow. Python examples, real endpoints, real pricing.

RedditAPI·
Reddit API in Python tutorial cover -- no-PRAW, no-OAuth path using plain requests
Reddit APIPython

Reddit API in Python: The Complete No-PRAW Tutorial (2026)

Use the Reddit API in Python without PRAW in 2026. Plain HTTP with requests or httpx, one bearer token. Code examples for posts, comments, search, votes, and DMs from $0.002 per call.

RedditAPI·
How to get Reddit comments via the API guide, an independent third-party tutorial on fetching a post's full comment tree by permalink, expanding more and morechildren nodes, and flattening nested replies in Python
Reddit APIComments

How to Get Reddit Comments via the API: Fetch the Full Comment Tree (2026)

Fetch Reddit comments by permalink, walk the nested tree, expand the more / morechildren nodes, and flatten replies in Python. Copy-paste code and first-party numbers, 2026.

RedditAPI·
Reddit API pagination guide, an independent third-party tutorial on the after cursor, the 100-per-page limit, and getting complete data past the ~1000-item listing ceiling with copy-paste Python
Reddit APIPagination

Reddit API Pagination: The after Cursor and Getting Past the 1000-Item Ceiling (2026)

How Reddit API pagination works: the after cursor, the 100-per-page cap, and getting past the ~1000-item ceiling. Copy-paste Python and first-party numbers, 2026.

RedditAPI·
Independent third-party guide to finding subreddits programmatically via API, discovering communities by keyword and ranking them by activity in Python
Reddit APISubreddit Finder

How to Find Subreddits Programmatically: A Subreddit Finder API Guide (2026)

Find subreddits by keyword at scale in 2026. Discover communities with the search/communities API, rank them by real activity, and compare the native reddit.com/search.json path with copy-paste Python.

RedditAPI·
A developer guide to Reddit's DM, Chat, and Modmail API surfaces in 2026, mapping each messaging surface to its endpoint and use case. redditapis.com is an independent third-party not affiliated with Reddit Inc
Reddit APIReddit Chat

Reddit DM vs Chat vs Modmail: When to Use Each API Surface

Reddit has three message surfaces in 2026: Private Messages, Chat, and Modmail. What each one is, the endpoint and scope behind it, and how to pick.

RedditAPI·