Endpoints
Publish a comment
Posts a comment on Reddit from a SubReply-managed account, behind a residential proxy.
/api/v1/publish50 creditsThis route really does post on Reddit
r/testingground4bots first, check the permalink you get back, and only then wire the route into production.Parameters
Request body (application/json)
| Parameter | Type | Required | Description |
|---|---|---|---|
post_url | string | Required | Full URL of the Reddit post to comment under. Must start with https://www.reddit.com/ or https://reddit.com/. |
comment | string | Required | Comment text, between 10 and 2,000 characters. Below 10 it is not a comment — and an « ok » damages the credibility of the account posting it. |
Example
curl -s -X POST https://subreply.io/api/v1/publish \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sr_live_VOTRE_CLE_API" \
-d '{
"post_url": "https://www.reddit.com/r/startupfrance/comments/1abc23/...",
"comment": "J'\''ai monté mon cabinet il y a deux ans avec exactement le même problème..."
}'{
"status": "posted",
"reddit_comment_url": "https://www.reddit.com/r/startupfrance/comments/1abc23/_/xyz789",
"account_used": "subreply_community",
"credits_used": 50,
"credits_remaining": 450
}{
"status": "queued",
"reddit_comment_url": null,
"account_used": "subreply_community",
"credits_used": 0,
"credits_remaining": 500
}202: do not retry
202 means the request went out but the publication is not confirmed. Nothing is charged — and above all, do not replay the call: the comment may already be live, and you would post a second one. Check the post before any new attempt.How it works
Picking an account from the pool
SubReply picks an active Reddit account with a valid session, the least used of the pool — so that API traffic never rests on a single account.
503 and charges nothing.Residential proxy
The session runs behind a sticky residential IP tied to the account. One account keeps its IP from one post to the next, like a real user.
Browser-driven publishing
A real Chrome opens the post and types the comment, with human delays and a human typing rhythm. No official Reddit API is involved.
Étape 1
Picking an account from the pool
503 and charges nothing.Shadowban safety
- Aged accounts: real accounts with history and karma, not accounts created on demand.
- Simulated human behaviour: real navigation, variable delays, progressive typing.
- Account rotation: the least used one posts first, so the pool absorbs the volume instead of concentrating it.
Billing
The 50 credits are charged after confirmation of the publication, never on send. Concretely:
200with a permalink → charged.202,422,503→ no charge.- Replay on the same
post_url→credits_used: 0, the charge is idempotent per post. Careful: that protects against a double charge, not against a double comment on Reddit.
Errors specific to this route
| Code | Cause | What to do |
|---|---|---|
503 | Publishing service unavailable: no account available to post, or the service is not answering. | Retry in 60 s. Nothing was charged and, if the comment did go out, the idempotent charge protects you from paying twice. |
422 | Functional refusal: post locked, archived or deleted, subreddit read-only, or Reddit account momentarily unavailable. | Do not retry as-is — fix it. The error message carries the exact reason returned by the service. |
The full list is on the error codes page.
Client-side timeout
A call can take up to two minutes. Set your HTTP client timeout to at least 180 seconds: a short client-side timeout cuts the connection without cancelling the publication, and you lose the permalink of a comment that is live all the same.
const response = await fetch("https://subreply.io/api/v1/publish", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.SUBREPLY_API_KEY}`,
},
body: JSON.stringify({ post_url: postUrl, comment }),
// 3 minutes : la publication passe par un vrai navigateur.
signal: AbortSignal.timeout(180_000),
});