BlueskyAPI
Post to Bluesky from your code
One API call puts a post on Bluesky, threads included. You connect with an app password instead of an OAuth app, and the 300 grapheme limit is checked before anything is published.
What you can build
Post when a release ships
Announce the version straight from your deploy script.
import { yeetpost } from "yeetpost";
await yeetpost({
connection: "bluesky",
text: `v${version} is live. ${changelogUrl}`,
});Post a thread, up to 24 replies
The head post carries the images, and each reply is one entry in thread.
const response = await fetch("https://api.yeetpost.com/api/v2/posts", {
method: "POST",
headers: {
"x-api-key": process.env.YEETPOST_API_KEY,
"content-type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({
text: "three things we got wrong in the scheduler:",
connectionSlugs: ["bluesky"],
thread: [
"1. polling every second. the queue is a table, and postgres is fine with SKIP LOCKED.",
"2. retrying forever. five attempts and a dead letter beats an infinite loop.",
],
}),
});Read how much of the thread survived
Bluesky cannot roll back a half-published thread, so read threadCount instead of assuming.
const data = await response.json();
const bluesky = data.results.find((r) => r.connectionSlug === "bluesky");
console.log(bluesky.status, bluesky.threadCount, bluesky.url);Related features
- Post to Bluesky from your terminal
- Automate LinkedIn posts from your code
- Post to X programmatically
- Send Discord messages from your code
Explore the full catalog on the features hub.
Related resources
Ready to get started?
Start posting to Bluesky in minutes.