Discourse REST API Dokumentation

<div data-theme-toc="true"> </div>

# Discourse API

Weitere Informationen finden Sie auf der Discourse API-Dokumentationsseite:

  https://docs.discourse.org

> ## :information_source: Authentifizierung
> **API-Anfragen müssen eine Authentifizierung über HTTP-Header verwenden.** Übergeben Sie Ihren `Api-Key` und `Api-Username` als HTTP-Header. Die Authentifizierung über Abfrageparameter oder den Anforderungskörper wird nicht unterstützt (dies wurde im April 2020 entfernt). Siehe das unten stehende cURL-Beispiel.
>
> Die einzigen API-Endpunkte, die weiterhin Anmeldeinformationen in Abfrageparametern unterstützen, sind Anfragen an RSS-Feeds, den Mail Receiver-Endpunkt und ICS-Routen.
Die Content-Type kann auf „application/x-www-form-urlencoded“, „multipart/form-data“ oder „application/json“ gesetzt werden.

Hier ist ein Beispiel für eine POST-Anfrage über cURL:

```text
curl -X POST "http://127.0.0.1:3000/categories" \
-H "Content-Type: multipart/form-data;" \
-H "Api-Key: 714552c6148e1617aeab526d0606184b94a80ec048fc09894ff1a72b740c5f19" \
-H "Api-Username: discourse1" \
-F "name=89853c20-4409-e91a-a8ea-f6cdff96aaaa" \
-F "color=49d9e9" \
-F "text_color=f0fcfd"

Hier ist ein Beispiel dafür, wie die API-Dokumentationsseite aussieht:

redoc

Die API nutzen

Sie können die API mit cURL-Befehlen verwenden, aber wir empfehlen die Verwendung des Gems discourse_api, damit Sie Ruby verwenden können.

Reverse Engineering von API-Endpunkten

Nicht jeder Endpunkt ist dokumentiert, aber Sie können ein Beispiel für eine API-Anfrage und -Antwort für jeden Endpunkt finden, indem Sie dieser Anleitung folgen:

Globale Ratenbegrenzungen und Drosselung in Discourse

Discourse wird mit 3 verschiedenen globalen Ratenbegrenzungen ausgeliefert, die von Seitenadministratoren konfiguriert werden können. Weitere Einzelheiten zu diesen Limits finden Sie unter:

Erstellen von Benachrichtigungen über die API

Spezifikation der Benutzer-API-Schlüssel


Zuletzt überprüft von @sam am 2026-03-17T17:00:00Z

97 „Gefällt mir“
API: Can I authenticate without putting the key in the URL?
Online User API?
Deeply integrating Discourse into website
How can I update trust level via SSO site
Discourse Add Group API
Do we have any API or way to get latest post details for a particular Topic in discourse?
JSON API, get topics sorted by created_at
Quick Messages Plugin
Update current user fields through JavaScript?
API call to watch categories and tags
'BAD CSRF' while creating a new post
How to get uploaded image url using the Discourse API?
Discourse Trust Levels for Discord
Discourse API - Unable to query certain endpoints
How to update profile information via API
Get notifications via the API
Use discourse_post_id to get single topic data from API
Synchronizing Changes for SSO users
What determines the order of frequent poster icons in the topic list?
Working with different needs in raw/cooked content
What is Discourse Blog built with?
How to Create a Script to "Bulk Remove" from a Group?
Display username when login in banner
Possible for admins to create bookmarks for users?
API: Can I authenticate without putting the key in the URL?
RSS Feed Stopped Working?
Logout POST Request
Which CMS for Discourse
SSO_SYNC not found
WP Discourse plug in being odd
Drupal SSO generates incorrect user sessions
403 Error during multiple API calls
/admin/users/1/log_out route error
Delete user avatar by API
Acess-Control-Allow-Headers CORS Error with API after updating discourse
How do I send a topic id just created?
What is Discourse API?
Can Discourse API link with Obsidian?
Bot writer's tip: Processing every post
Access reports JSON data via Pipedream
Provide topic count via Discourse AI tool API `discourse.getUser` function
Help me troubleshoot my Discourse SSO
Bulk undelete topics
Best Practise for Using a Raspberry PI as Bot for Posting Updates in Discourse
Getting ["BAD CSRF"] when updating topic via API [python]
"BAD CSRF" when executing PUT using API, curl, and PHP
Getting a user's discourse subscriptions through api
Understanding pageviews and the site traffic report
Where should I put the API keys of discourse so that I can fetch the posts?
Getting an error while trying to fetch individual posts
Update mail-receiver to the release version
Migrate a Jive Clearspace forum to Discourse
Reverse engineer the Discourse API
Use the Discourse API ruby gem
Return only specific fields from the API GET response
Having issue accessing the Discourse APIs from react app
Best way to create external-facing API for creating topics?
User Status
Share your use cases of using Discourse REST API 🧑‍💻
How to do single sign-on with forum program?
How to make "toggle whisper" reply using API and POST request
How to get posts viewed by a user via APIs?
Creating alternate user directory
Can't create new group via api (/admin/groups.json - post method)
Is there an api to set the primary group for a user
All API calls now getting "You are not permitted to view the requested resource"
Finding a user by their identity provider 'external ID'
Issues with the /get-users ending point
"Api-Key" and "Api-Username" for try.discourse.org?
Missing anchor links in certain TOC topics?
Creating a new topic on behalf of a user
How can I update trust level via SSO site
Shopify Integration
[Announce] Search & replace / batch process Discourse posts
API Error: You are not permitted to view the requested resource
Can an admin change a user's email address?
Can't send PM via API (HTTPUnprocessableEntity 422)
Swagger, WADL or similar for the REST API?
Vague error from clicking on a tag link on this site
Work Around to posting
Discourse dislike Api?
A list of server-side functions for weekend/novice Discourse developers?
Seeding a new forum by creating users and content
How to implement Discourse with an already built Rails project
Using the API, can't PUT to topic unless slug is on the URL
Using the API, can't PUT to topic unless slug is on the URL
Incoming webhooks (Incoming into Discourse)
Managing site customization via API
Discourse API Documentation Using RAML
Is it possible to mount a playable video game into a discourse forum?
Interact with discourse from Python?
Is there is any open API for getting similar topic in discourse?