Analytics (What works)

Your best posts against your own median, the patterns behind them, and drafts modelled on a winner.

View as MarkdownOpenAPIBase URL https://postwire.io

Every post PostWire published in the last 90 days, compared with the median of the same account on the same network. A network that does not share a number is listed with the reason, never as a zero. n is always returned.

What works: your best posts against your own median, and the patterns behind them

GET/api/insights

Every post PostWire published for the account in the last 90 days, compared with the median of the same social account on the same network (views where the network reports them, otherwise likes + reposts + replies). n is always returned; posts under 24 hours old are not ranked; a network that does not share a number is listed with the reason instead of a zero. Free plans get the 3 best posts; paid plans get the full ranking and the patterns (format, day, time of day, length, hashtags, first-line type), which need at least 10 ranked posts and 3 posts per group. On a plan without patterns, locked.patterns_preview lists the patterns that are ready with the size of each effect (x_median, n) but not the winning value, locked.best_time does the same for the best time to post, and locked.teaser sums it up (or says how many more measured posts are needed).

Needs an API key: Authorization: Bearer pw_live_….

Parameters

FieldTypeDescription
brand_idquery, string
platformquery, string
tzquery, stringIANA timezone for the day/time patterns (default UTC)

Responses

StatusMeans
200{ top: [{ id, platform, value, metric, median, n, x_median, headline, why[] }], networks[], patterns | null, locked: { patterns_ready, patterns_status, patterns_preview[], best_time, teaser, more_posts_ranked } | null, insights_teaser?, upgrade? }
401API key required
404brand not found
curl
curl "https://postwire.io/api/insights?platform=bluesky&tz=America%2FLima" \
  -H "Authorization: Bearer $POSTWIRE_API_KEY"
Node
const res = await fetch("https://postwire.io/api/insights?platform=bluesky&tz=America%2FLima", {
  method: "GET",
  headers: { Authorization: `Bearer ${process.env.POSTWIRE_API_KEY}` },
});
console.log(res.status, await res.json());
Python
import os, requests

r = requests.get(
    "https://postwire.io/api/insights?platform=bluesky&tz=America%2FLima",
    headers={"Authorization": f"Bearer {os.environ['POSTWIRE_API_KEY']}"},
)
print(r.status_code, r.json())

Draft new posts modelled on one of your best posts (nothing is published)

POST/api/insights/replicate

Writes one draft per network reusing the structure, opening, length, format and tone of a post from /api/insights, on a new topic or angle; its sentences are not reused. Counts toward the daily AI limit. Paid plans.

Needs an API key: Authorization: Bearer pw_live_….

Body (JSON)

FieldTypeDescription
post_id requiredstring
platformsarray of string
topicstring
brand_voicestring

Responses

StatusMeans
200{ drafts: { <platform>: { text, title?, tags? } }, reference, published: false }
402not included in the current plan (code plan_feature, with the plan that includes it)
404post not found
429daily AI limit
503AI not configured
curl
curl -X POST "https://postwire.io/api/insights/replicate" \
  -H "Authorization: Bearer $POSTWIRE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "post_id": "at://did:plc:4x2…/app.bsky.feed.post/3l7…",
  "platforms": [
    "bluesky",
    "linkedin"
  ],
  "topic": "our new rye"
}'
Node
const res = await fetch("https://postwire.io/api/insights/replicate", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.POSTWIRE_API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "post_id": "at://did:plc:4x2…/app.bsky.feed.post/3l7…",
    "platforms": [
      "bluesky",
      "linkedin"
    ],
    "topic": "our new rye"
  }),
});
console.log(res.status, await res.json());
Python
import os, requests

r = requests.post(
    "https://postwire.io/api/insights/replicate",
    headers={"Authorization": f"Bearer {os.environ['POSTWIRE_API_KEY']}"},
    json={
        "post_id": "at://did:plc:4x2…/app.bsky.feed.post/3l7…",
        "platforms": ["bluesky", "linkedin"],
        "topic": "our new rye",
    },
)
print(r.status_code, r.json())

Turn click tracking of your own links on or off

POST/api/insights/settings

With track_links on, https links in posts to Bluesky, Mastodon, LinkedIn, Facebook, Telegram, Discord and YouTube go out as postwire.io/r/<code> and redirect to the same page; clicks show up in /api/insights. Paid plans.

Needs an API key: Authorization: Bearer pw_live_….

Body (JSON)

FieldTypeDescription
track_links requiredboolean

Responses

StatusMeans
200{ ok, track_links }
402not included in the current plan
curl
curl -X POST "https://postwire.io/api/insights/settings" \
  -H "Authorization: Bearer $POSTWIRE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "track_links": true
}'
Node
const res = await fetch("https://postwire.io/api/insights/settings", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.POSTWIRE_API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "track_links": true
  }),
});
console.log(res.status, await res.json());
Python
import os, requests

r = requests.post(
    "https://postwire.io/api/insights/settings",
    headers={"Authorization": f"Bearer {os.environ['POSTWIRE_API_KEY']}"},
    json={
        "track_links": True,
    },
)
print(r.status_code, r.json())