One API Call to Post on Mastodon
The Mastodon API varies across instances with different versions, rate limits, and custom configurations. RelayAPI handles OAuth, rate limits, media hosting, and API changes.
No credit card required · Free plan available
const response = await fetch('https://api.relayapi.dev/v1/posts', {
method: 'POST',
headers: {
'Authorization': 'Bearer rlay_live_xxxxxxxxxx',
'Content-Type': 'application/json',
},
body: JSON.stringify({
content: 'Check out our latest update!',
platforms: ['mastodon'],
media: ['https://cdn.example.com/image.jpg'],
}),
});Mastodon API
- Each Mastodon instance runs different software versions with varying API compatibility and feature support
- OAuth app registration must be done per-instance, requiring dynamic client registration for multi-instance support
- Rate limits vary by instance (default 300/5min) and some instances enforce stricter custom limits
- Media uploads have instance-specific file size limits and supported format lists that differ from the spec
- Content visibility (public, unlisted, followers-only, direct) and content warnings interact in non-obvious ways
RelayAPI
- RelayAPI normalizes API differences across Mastodon instances and forks (Pleroma, Akkoma, Misskey) into a consistent interface
- We handle per-instance OAuth app registration, token management, and dynamic client creation automatically
- Instance-specific rate limits are detected and tracked automatically with per-instance queuing and backoff
- Upload media to RelayAPI and we validate against the target instance's limits, convert formats, and handle thumbnails
- Simple visibility parameters with automatic content warning handling and instance-specific rule compliance
Supported Content Types
How It Works
Connect Your Account
Authorize your Mastodon account via OAuth in 30 seconds
Build Your Integration
Use the REST API or our SDKs to publish content
RelayAPI Handles the Rest
We manage publishing, rate limits, and delivery notifications
Ship Faster
Post to any Mastodon instance with a single API call. No per-instance OAuth registration, no version detection, no format negotiation. Specify your instance and content, we handle the rest.
Official API, Zero Hassle
RelayAPI uses the official Mastodon API. Your posts appear natively in timelines with full ActivityPub federation, while we handle instance compatibility, OAuth, and rate limits.
Multi-Instance Compatibility
The fediverse includes Mastodon, Pleroma, Akkoma, and other compatible platforms. RelayAPI detects the instance type and adapts API calls for maximum compatibility across the fediverse.
Frequently Asked Questions
Start Building with Mastodon
Join developers who chose RelayAPI over building with Mastodon API directly.
Get Started Free© 2026 Relay. All rights reserved.