API documentation

Learn how to get started with the Mastodon API, including REST requests, responses, and parameters.

docs.joinmastodon.org/client/intro
API documentation homepage screenshot

About API documentation

This page is the Mastodon documentation's introduction to the Mastodon REST API. It explains how the API exposes Mastodon data over HTTP with JSON payloads, which HTTP methods endpoints accept, and how clients should read responses. It is written as a primer for developers rather than a reference for individual endpoints.

The page covers sending parameters as query strings, form data or JSON, encoding arrays, nested hashes and booleans, and uploading files with multipart/form-data. It also lists HTTP status codes clients may encounter, including 200, client errors such as 401, 404, 410, 422 and 429, and server errors such as 503. Examples use the cURL command-line utility.

Key features

  • Explains REST API access to Mastodon data over HTTP with JSON
  • Covers GET, POST, PUT/PATCH and DELETE methods on endpoints
  • Describes parameters as query strings, form data or JSON
  • Documents bracket notation for arrays and nested hash parameters
  • Notes multipart/form-data encoding for file uploads
  • Lists expected HTTP response codes for client and server errors
Best for: Developers who need an introductory explanation of how to make HTTP requests to the Mastodon API and interpret its responses.
Good for
  • Includes concrete cURL examples for each parameter format
  • Explains data type encoding for arrays, hashes and booleans
  • Describes how to interpret response text, headers and status codes
Watch out for
  • Presented as an introductory primer rather than a full endpoint reference
  • Examples are given with cURL instead of language-specific libraries

API documentation at a glance

Type
Website
Pricing
Not confirmed. Check the site
Platforms
Web
Open source
Not stated
Language
English
Last checked
Oct 6, 2026 · Online when checked
Listed
Oct 5, 2026

Popular in Fediverse

Well-known listings from the same topic.

All 113

API documentation FAQ

What format does the Mastodon API return?
Responses are returned as JSON text, along with HTTP headers and an HTTP status code indicating how the server handled the request.
How can request parameters be sent?
The API understands query strings, form data and JSON. Query strings are expected for GET requests, while form data or JSON is used for other requests.
How are arrays and nested parameters encoded?
Bracket notation is used, for example array[]=foo&array[]=bar for arrays and source[privacy]=public&source[language]=en for nested parameters.
Is something wrong or out of date?

Tell us and an editor will check it.

Own this website?

Claim the listing and suggest updates yourself. An editor checks every claim first.

Claim this listing