Ship Your First Post in 5 Minutes
Get an API key, send one request, and watch your post go live on X and Threads. A zero-to-published quickstart.
Posted by
Related reading
How to Give Your AI Agent a Social Media Voice
Wire up LangChain, OpenAI Assistants, or any agent framework to PostStash so your AI can publish to X and Threads autonomously.
Most social APIs make you wade through OAuth docs, token refresh flows, and platform-specific quirks before you can publish a single post. PostStash collapses all of that into one endpoint and one Bearer token.
This guide takes you from zero to a published post on X and Threads in under five minutes. All you need is curl (or your language of choice).
1. Grab Your API Key
Head to poststash.com/login and sign up — no credit card required on the free tier. Once you're in the dashboard, navigate to Settings → API Keys and create a key. It'll look something like ps_live_abc123….
That key is the only credential you need. No OAuth handshake, no client IDs, no callback URLs.
2. Connect Your Platforms
In the PostStash dashboard, connect the social accounts you want to post to — X, Threads, or both. PostStash handles the OAuth flow with each platform for you. Once connected, every API call you make publishes through those linked accounts automatically.
3. Send Your First Post
Open a terminal and fire off a request:
curl -X POST https://poststash.com/api/posts \
-H "Authorization: Bearer ps_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"platforms": ["x", "threads"],
"text": "Hello from the PostStash API 🚀"
}'That's it. No schedule field means the post goes out immediately. You'll get back a response with the post ID and status:
{
"success": true,
"post": {
"id": "a1b2c3d4-...",
"content": "Hello from the PostStash API 🚀",
"platforms": ["x", "threads"],
"status": "Ready",
"published": false
}
}Within moments the post will be live on both platforms.
4. Schedule a Post for Later
Want to queue something up instead? Add a schedule field with an ISO 8601 timestamp:
curl -X POST https://poststash.com/api/posts \
-H "Authorization: Bearer ps_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"platforms": ["x"],
"text": "This will go out tomorrow morning ☕",
"schedule": "2026-04-17T09:00:00Z"
}'PostStash checks for due posts every 10 minutes and publishes them automatically — you don't need to keep a server running.
5. Same Thing in Python & Node
Prefer a language over curl? Here's the same call in Python:
import requests
resp = requests.post(
"https://poststash.com/api/posts",
headers={"Authorization": "Bearer ps_live_YOUR_KEY"},
json={
"platforms": ["x", "threads"],
"text": "Hello from Python 🐍",
},
)
print(resp.json())And in Node (using fetch):
const resp = await fetch("https://poststash.com/api/posts", {
method: "POST",
headers: {
"Authorization": "Bearer ps_live_YOUR_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
platforms: ["x", "threads"],
text: "Hello from Node.js ✨",
}),
});
console.log(await resp.json());What's Next
You just published to two platforms with a single HTTP call. From here you can:
- Post threads by sending a posts array instead of text
- Attach images via multipart form data
- Pull analytics with GET /api/posts/:id/analytics
- Browse the full API reference for every endpoint
The free tier gives you 100 posts/month — more than enough to prototype, demo, or ship a side project.
Get your API key