yeetpostyeetpost

How to sendfrom

Follow these steps to connect Mastodon post, send from Terminal (curl), and track delivery.

Mastodon has no central developer app, so yeetpost registers itself on your instance the first time somebody connects an account there, and then sends you to that instance to approve posting. You type the host you are on, for example mastodon.social, and approve three scopes: read your account, write statuses, write media. No client id and no app registration of your own. From the terminal you call it with curl, which makes it easy to drop into a Makefile, a CI job or a git hook.

What Mastodon takes

How you connectYour instance host, then approval on that instance for three scopes
Connection slugmastodon for the first account, then a slug built from the handle
Text limitYour instance's own limit, read when you connect. 500 by default
ImagesUp to 4 per post, png, jpeg, gif or webp
Alt textYes, sent as each attachment's description
ThreadsYes, up to 24 replies under the head status
First commentNo, LinkedIn only
SchedulingYes
PermalinkWhatever your instance returned, in practice https://<host>/@<handle>/<status id>
Per-post feeNone
1

Connect your platform

Connect your Mastodon account to yeetpost through your own instance:

  1. Go to app.yeetpost.com
  2. Click Add connection and select Mastodon
  3. Type the instance your account is on, for example mastodon.social
  4. Approve the request on your instance: yeetpost asks to read your account, write statuses and write media

The host has to be reachable over https and has to be a public address. Nothing else is needed from you: no client id, no client secret and no app registration of your own.

Paste your connection slug here and we'll auto-fill it into the code examples below.

2

Get your API key

Get your API key from the yeetpost dashboard:

  1. Go to app.yeetpost.com/app/settings
  2. Copy your API key

Paste your API key here and we'll auto-fill it into the code examples below.

3

Send your post

Send a post using curl. The body is the post:

curl -X POST https://api.yeetpost.com/api/v2/post/<your-connection-slug> \ -H "x-api-key: <your-api-key>" \ -d 'Hello from yeetpost!'

To post to several connections in one call, use the JSON endpoint. It returns a result per connection and accepts an Idempotency-Key so retries are safe:

curl -X POST https://api.yeetpost.com/api/v2/posts \ -H "x-api-key: <your-api-key>" \ -H "content-type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "text": "Hello from yeetpost!", "connectionSlugs": ["<your-connection-slug>"] }'

Tip: You can also copy curl commands from the Playground tab in the yeetpost dashboard.

4

Track your posts

Monitor all your posts from the yeetpost dashboard:

  1. Go to the Feed tab in the yeetpost dashboard
  2. View all posts sent via yeetpost, including status and timestamps
5

Review the security checklist

Review the Security Checklist to ensure your implementation is secure.

When a Mastodon post is refused

Each of these fails only the Mastodon item. Every other connection on the same request still goes out. The full vocabulary is in the errors reference.

CodeStatusWhen
invalid_request400Text over the instance's limit, in the post or in any thread segment
media_unsupported400More than 4 images
shape_unsupported400A firstComment was given. Mastodon has no first comment
unauthorized401The token was revoked on the instance. Connect the account again
platform_rejected422The instance refused the image, is still processing it, or refused the status
internal_server_error500Our fault. Quote the req_id when you report it

Mastodon FAQ

Which Mastodon instances work?

Any instance yeetpost can reach over https on a public address. The app is registered on your instance on demand the first time somebody connects an account there, and reused after that.

Why was my post refused when it fits my instance's counter?

Mastodon weighs every URL as 23 characters. yeetpost counts them in full, so a link-heavy status is refused a little sooner than the instance would refuse it. That direction is the safe one: nothing is published and then rejected.

What about content warnings, visibility and polls?

Not supported yet. A post goes out as a plain public status. Content warnings, visibility, polls and the language field are on the list, not in the product.

My token stopped working. What do I do?

Mastodon tokens do not expire and there is no refresh token, so a 401 means the token was revoked on the instance. Connect the account again in the dashboard.

How do I make a retry safe from a shell script?

Send an Idempotency-Key header on POST /api/v2/posts, for example $(uuidgen). A retry carrying the same key returns the first result instead of posting twice.

Related guides

Related resources

Copy this guide (with your values) for use with LLMs or sharing with colleagues.