Bluesky APIUpdated
How to post to Bluesky via API
To post to Bluesky via API, sign in with com.atproto.server.createSession, then write an app.bsky.feed.post record with com.atproto.repo.createRecord. Links and mentions need facets with byte offsets. Siar, a unified social media API, builds the record, facets and image blobs from one request.
Status: Bluesky: open today. Checked 12 November 2026. Approval record.
Post with the AT Protocol directly
- Sign in. Create an app password in Bluesky's settings and call
createSessionwith the handle and that password. KeepaccessJwtfor requests andrefreshJwtforrefreshSession. - Upload images first. Each image goes through
com.atproto.repo.uploadBlob, which returns a blob to embed in the post. - Add facets. Mark each link, mention and hashtag with its UTF-8 byte range.
- Create the record.
createRecordwithtext,createdAtand anyembedandfacets.
# Step 1: sign in with the handle and an app password
curl -X POST "https://bsky.social/xrpc/com.atproto.server.createSession" \
-H "content-type: application/json" \
-d '{ "identifier": "yourname.bsky.social", "password": "APP_PASSWORD" }'
# => { "did": "did:plc:...", "accessJwt": "ACCESS_JWT", "refreshJwt": "REFRESH_JWT", ... }
# Step 2: write the post record
curl -X POST "https://bsky.social/xrpc/com.atproto.repo.createRecord" \
-H "authorization: Bearer ACCESS_JWT" \
-H "content-type: application/json" \
-d '{
"repo": "did:plc:YOUR_DID",
"collection": "app.bsky.feed.post",
"record": {
"$type": "app.bsky.feed.post",
"text": "Version 2.4 is out.",
"createdAt": "2026-11-20T09:00:00.000Z"
}
}'
# => { "uri": "at://did:plc:.../app.bsky.feed.post/...", "cid": "..." } Posts are written with com.atproto.repo.createRecord to the app.bsky.feed.post collection; "each post requires these fields: text and createdAt". Facets use byte offsets, and images are uploaded with uploadBlob.Source: Bluesky, creating a post, checked 12 November 2026.
The access token's "validity lifetime" is short; a new one is requested with com.atproto.server.refreshSession and the refresh token.Source: AT Protocol, XRPC, checked 12 November 2026.
Each account gets 5,000 points an hour and 35,000 a day, and creating a record costs 3 points: at most 1,666 records an hour and 11,666 a day.Source: Bluesky, rate limits, checked 12 November 2026.
A post holds up to four images, each with its own alt text and aspect ratio, and the guide limits each image to 1,000,000 bytes.Source: Bluesky, creating a post, checked 12 November 2026.
Errors you will meet
ExpiredToken: refresh the session, then repeat the request.AuthenticationRequired: the handle or app password is wrong; create a new app password.InvalidRequest: usually text over 300 graphemes.BlobTooLarge: an image over the size limit; compress it.
Each one, with the message and the fix: Bluesky API error codes.
The same post through Siar
With Siar, the user connects once with a handle and an app password (or Bluesky's OAuth). Siar stores the session encrypted, refreshes it, and turns one request into the record, its facets, the link card and the image blobs.
curl -X POST "https://api.siaran.my/api/v1/post" \
-H "x-api-key: $SIAR_API_KEY" \
-H "content-type: application/json" \
-d '{
"teamId": "TEAM_ID",
"title": "Bluesky post",
"postDate": "2026-11-20T09:00:00.000Z",
"status": "SCHEDULED",
"socialAccountTypes": [
"BLUESKY"
],
"data": {
"BLUESKY": {
"text": "Version 2.4 is out.",
"externalUrl": "https://example.com/changelog",
"tags": [
"release"
]
}
}
}' {
"id": "POST_ID",
"teamId": "TEAM_ID",
"organizationId": "ORGANIZATION_ID",
"title": "Bluesky post",
"referenceKey": null,
"postDate": "2026-11-20T09:00:00.000Z",
"postedDate": null,
"status": "SCHEDULED",
"data": {
"BLUESKY": {
"text": "Version 2.4 is out.",
"externalUrl": "https://example.com/changelog",
"tags": [
"release"
]
}
},
"error": null,
"errors": null,
"errorsVerbose": null,
"externalData": null,
"retryCount": 0,
"createdAt": "2026-11-12T08:00:00.000Z",
"updatedAt": "2026-11-12T08:00:00.000Z",
"deletedAt": null,
"firstComment": null
} Related: Bluesky posting and scheduling API · Bluesky API error codes · Network status · Bluesky approval record
Frequently asked questions
How do I create a post with the Bluesky API?
Sign in with com.atproto.server.createSession (a handle and an app password) to get an access token, then call com.atproto.repo.createRecord with your DID as repo, app.bsky.feed.post as the collection, and a record holding text and createdAt. The response returns the post's uri and cid.
Why is my Bluesky link not clickable?
Links, mentions and hashtags are not parsed from the text. Each needs a facet with byteStart and byteEnd, counted in UTF-8 bytes rather than characters, and a feature such as app.bsky.richtext.facet#link. An emoji before the link shifts the byte offsets.
How many posts can I publish through the Bluesky API?
Each account gets 5,000 points an hour and 35,000 a day, and a new record costs 3 points: at most 1,666 records an hour and 11,666 a day. Posts, likes and reposts all count as records.
What does Bluesky ExpiredToken mean?
The access token is short-lived and has expired. Call com.atproto.server.refreshSession with the refresh token, then repeat the request. If that fails too, sign in again. The Bluesky ExpiredToken fix has the details.
Your first post is one request away.
Start with 20 free posts to try. No card. A one-time allowance, with no time limit.