Libraries & SDKs

PostFuze is a plain JSON REST API, so you can call it from any language with an HTTP client — no SDK required. Every endpoint is also reachable through the MCP server for AI agents. Everything talks to the same API at https://api.postfuze.com/api/v1 and authenticates with the same bearer key.

Official SDKs are coming

Dedicated Node.js and Python SDKs are on the roadmap. Until they ship, use the raw-HTTP snippets below (or any HTTP client in your language) — the API is small and stable, so anything you build against it now keeps working when the SDKs land.

Authentication & keys

Every request authenticates with an API key sent as a bearer token: Authorization: Bearer sk_live_…. Keys come in two flavors:

  • sk_live_… — production keys, for real publishing traffic.
  • sk_test_… — test keys, for development and CI.

The examples below read the key from the POSTFUZE_KEY environment variable so you can keep secrets out of your code. Set it once in your environment:

Environment
export POSTFUZE_KEY="sk_live_…"

See Authentication for key creation, rotation, and revocation. Keys are shown only once at creation time, so store them in a secrets manager rather than committing them.

Node.js / TypeScript

Modern Node (18+) has a global fetch, so no dependencies are needed. Set Content-Type and the bearer header and POST JSON:

Create a post — TypeScript
const res = await fetch('https://api.postfuze.com/api/v1/posts', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.POSTFUZE_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    content: 'Hello from the unified PostFuze API 👋',
    accounts: ['a1b2c3d4-…'],
  }),
});

const post = await res.json();
console.log(post.id, post.status); // e.g. "p0s7-…" "queued"

Python

Any HTTP client works; requests is the most common. Send the bearer header and a JSON body:

Create a post — Python
import os, requests

res = requests.post(
    "https://api.postfuze.com/api/v1/posts",
    headers={"Authorization": f"Bearer {os.environ['POSTFUZE_KEY']}"},
    json={
        "content": "Hello from the unified PostFuze API 👋",
        "accounts": ["a1b2c3d4-…"],
    },
)

post = res.json()
print(post["id"], post["status"])  # e.g. "p0s7-…" "queued"

curl

The same request from the shell — handy for quick checks and CI scripts. Set the Authorization and Content-Type headers and POST JSON:

curl — create a post
curl https://api.postfuze.com/api/v1/posts \
  -H "Authorization: Bearer $POSTFUZE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Hello from the unified PostFuze API 👋",
    "accounts": ["a1b2c3d4-…"]
  }'

Every request and response shape is documented in the REST reference — the JSON bodies are identical across curl, Node, and Python.

MCP server

Beyond raw HTTP, every PostFuze endpoint is also exposed through an MCP server, so AI agents and MCP-aware clients can connect accounts, create posts, schedule, and read analytics as tools. If you are wiring PostFuze into an assistant or agentic workflow, start with the MCP setup guide.

Next steps

  • Quickstart — from zero to a published post in about five minutes.
  • Posts — the full create-post reference.
  • Scheduling — publish at a future time with scheduled_at.
  • MCP setup — use PostFuze as tools from an AI agent.