Networks

Mastodon API: post statuses on any server

Mastodon: open today, on any server. Siar, a unified social media API, publishes statuses to Mastodon accounts on any server with one REST request: list MASTODON in socialAccountTypes and put the Mastodon payload under data.MASTODON. Add other networks to the same request to post to all of them at once.

Status checked 12 November 2026 against Siar's approval records. Each network's status, and Mastodon's approval record.

How to post to Mastodon via API

Send POST /post with your API key in x-api-key. Use privacy for visibility and spoiler for a content warning. The account's server is the one it connected from. A request that breaks one of Mastodon's rules gets a 400 with an issues entry before anything is sent.

Example request
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": "Mastodon post",
    "postDate": "2026-11-20T09:00:00.000Z",
    "status": "SCHEDULED",
    "socialAccountTypes": [
      "MASTODON"
    ],
    "data": {
      "MASTODON": {
        "text": "Version 2.4 is out. Changelog in the thread.",
        "privacy": "PUBLIC"
      }
    }
  }'
Example response (200)
{
  "id": "POST_ID",
  "teamId": "TEAM_ID",
  "organizationId": "ORGANIZATION_ID",
  "title": "Mastodon post",
  "referenceKey": null,
  "postDate": "2026-11-20T09:00:00.000Z",
  "postedDate": null,
  "status": "SCHEDULED",
  "data": {
    "MASTODON": {
      "text": "Version 2.4 is out. Changelog in the thread.",
      "privacy": "PUBLIC"
    }
  },
  "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
}

The post is stored as SCHEDULED. At postDate Siar publishes it, and a signed post.published webhook reports the result when the post reaches a final state. Read it any time with GET /post/{id}.

Mastodon fields

  • text string nullable
  • uploadIds string[] nullable
  • thumbnail string nullable
  • privacy string nullable
    One of: PUBLIC UNLISTED PRIVATE DIRECT
  • spoiler string nullable

What Siar can do on Mastodon

Comments and repliesYes
First commentYes
Edit a published postYes
Delete a published postYes
Edit a commentYes
Delete a commentYes
Import commentsYes
Post analyticsYes
Account analyticsYes
Post history importYes
Direct messagesNo

Siar can create comments and replies up to 500 characters, and import the comments people leave on your posts.

Mastodon API limits

By default every endpoint can be called 300 times in 5 minutes per account and per IP; media uploads and status deletions 30 times in 30 minutes. Servers can change these, and the X-RateLimit-Remaining and X-RateLimit-Reset headers say where you stand.Source: Mastodon, rate limits, checked 12 November 2026.

Siar's daily caps

Per connected account, per UTC dayFreeStarter and ProBusiness
Posts1050100
Comments350100

Monthly post quotas are on pricing. Enterprise uses the Business caps unless agreed otherwise.

Text and media rules Siar checks before sending

ConnectionOAuth 2.0 in the browser
ChannelNot needed
Post typespost
Text length500 characters
Comment length500 characters
Media per postUp to 4

Media rules

KindFormatsMax sizeDurationOther
Imagejpeg, png, gif, webp, avif, heic16 MBn/aNone
Videomp4, webm, mov99 MBUp to 2 hNone

Mastodon API scopes

Siar sends the user to the network's consent page and stores the tokens it gets back, refreshing them before they expire. Use POST /social-account/connect from your own UI, or send your customer a hosted link from POST /social-account/create-portal-link; see connecting accounts.

Siar requests only these scopes at connect time:

  • read
  • write

Mastodon-specific operations

These exist for Mastodon only and live under /misc/mastodon.

OperationEndpoint
Edit an existing Mastodon statusPATCH /misc/mastodon/status
Delete a Mastodon statusDELETE /misc/mastodon/status
Edit a Mastodon commentPATCH /misc/mastodon/comment
Delete a Mastodon commentDELETE /misc/mastodon/comment

Mastodon MCP

TypeScript SDK, CLI and MCP server (version 0.1.0), built from the same OpenAPI contract. Not on npm yet. The MCP server exposes the same operations as the REST API, so an agent can post to Mastodon through it with the same payload as above. Because it is not on npm yet, there is no install command to copy; the SDK, CLI and MCP page says what exists today.

Mastodon API error codes

When Mastodon says no, Siar keeps Mastodon's own code and message on the post, word for word, with a plain-English fix and a retry verdict. Mastodon reports errors by HTTP status, and the reference covers each one. Mastodon API error codes and how to fix them.

Mastodon API questions

What can I post to Mastodon through the API?

post. Statuses on any Mastodon server, with visibility, content warnings and media. Siar registers its app on each server the first time someone connects from it.

How many Mastodon posts can I publish per day?

Siar caps posts per connected account and UTC day: 10 on Free, 50 on Starter and Pro, 100 on Business. Mastodon's own limits also apply; they are on this page with their source.

Can I schedule Mastodon posts?

Yes. Set postDate in the future and a status of SCHEDULED. Siar publishes at that time and sends a signed post.published webhook when the post reaches a final state.

How do I connect a Mastodon account?

An account on any Mastodon server. Pass the server URL when connecting. Siar sends the user to the network's consent page and stores the tokens it gets back, refreshing them before they expire.

What happens when Mastodon rejects a post?

The post keeps Mastodon's own code and message, with a fix. The Mastodon API error codes and how to fix them page explains each HTTP status and what to do.

Building on more than Mastodon? Siar publishes to Facebook, Instagram, Threads, X, LinkedIn profiles, Bluesky, Mastodon, Discord and Slack today. See the social media posting API and the social media scheduling API.

Other networks

TikTok API · YouTube API · Instagram API · Facebook API · X (Twitter) API · Threads API · LinkedIn API · Pinterest API · Reddit API · Discord API · Slack API · Bluesky API · Google Business Profile API · Snapchat API

Your first post is one request away.

Start with 20 free posts to try. No card. A one-time allowance, with no time limit.