Discourse Users API

The Users API from Discourse — 23 operation(s) for users.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 25

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /user-badges/{username}.json List the badges a user has earned · List badges for a user #
Ask an LLM
“What badges has a particular user earned on the forum?”
“Can I see a member's badges by their username?”
Tell an agent
List the badges for user {username}.
Show the earned badges of {username}.
POST /users.json Create a new user account · Creates a user #
Ask an LLM
“How do I create a new user account through the API?”
“Can I set a user's external ID when creating them?”
Tell an agent
Create a user {username} with name {name}, email {email} and password {password}.
Add a new member {username} named {name} with email {email} and password {password}.
GET /u/{username}.json Get a user's profile · Get a single user by username #
Ask an LLM
“What profile information is stored for a user?”
“Can I fetch one member's details by username?”
Tell an agent
Get the profile of user {username}.
Show me the details of {username}.
PUT /u/{username}.json Update a user's profile · Update a user #
Ask an LLM
“How do I change a user's name or external ID?”
“Can I update a member's profile fields?”
Tell an agent
Update user {username} with name {name}.
Set the external ID of {username} to {external_ids}.
GET /u/by-external/{external_id}.json Find a user by external ID · Get a user by external_id #
Ask an LLM
“How do I look up a user when I only have their external ID?”
“Can I find a member by an external ID I stored?”
Tell an agent
Find the user with external ID {external_id}.
Look up the member whose external ID is {external_id}.
GET /u/by-external/{provider}/{external_id}.json Look up a user by external ID · Get a user by identity provider external ID #
Ask an LLM
“Can I find a user from my identity provider's external ID?”
“What does a user's external ID lookup return?”
Tell an agent
Find the user whose {provider} external ID is {external_id}.
Look up user {external_id} from identity provider {provider}.
PUT /u/{username}/preferences/avatar/pick.json Set a user's avatar from an upload · Update avatar #
Ask an LLM
“How do I set a user's profile picture from an uploaded image?”
“Can I choose the avatar type when setting it?”
Tell an agent
Set {username}'s avatar to upload {upload_id} of type {type}.
Use upload {upload_id} as {username}'s avatar with type {type}.
PUT /u/{username}/preferences/email.json Change a user's email address · Update email #
Ask an LLM
“How do I change a member's email address?”
“Can I update a user's email through the API?”
Tell an agent
Change {username}'s email to {email}.
Set the email of {username} to {email}.
PUT /u/{username}/preferences/username.json Change a user's username · Update username #
Ask an LLM
“How do I rename a member's username?”
“Can I change a user's username through the API?”
Tell an agent
Rename {username} to {new_username}.
Change the username of {username} to {new_username}.
GET /directory_items.json List public users · Get a public list of users #
Ask an LLM
“Who are the most active users on the forum right now?”
“Can I get a public list of members ordered by activity?”
Tell an agent
List the top {order} public users over the {period}.
Show public users ordered by {order} for {period}, {asc} ascending.
GET /admin/users/{id}.json Get a user by admin ID · Get a user by id #
Ask an LLM
“How do I look up a user's account by their admin ID?”
“Can I fetch a member's account details using the admin user ID?”
Tell an agent
Get user {id} using the admin API.
Show admin details for user {id}.
DELETE /admin/users/{id}.json Delete a user account · Delete a user #
Ask an LLM
“How do I permanently delete a user account?”
“Can I delete a member's posts along with their account?”
Tell an agent destructive · confirm first
Delete user {id}.
Delete user {id} and set delete_posts to {delete_posts}.
PUT /admin/users/{id}/activate.json Activate a deactivated user · Activate a user #
Ask an LLM
“How do I reactivate a user who was deactivated?”
“Can I bring a deactivated member back online?”
Tell an agent
Activate user {id}.
Reactivate the deactivated account {id}.
PUT /admin/users/{id}/deactivate.json Deactivate a user account · Deactivate a user #
Ask an LLM
“How do I deactivate a user account?”
“Can I temporarily disable a member without deleting them?”
Tell an agent
Deactivate user {id}.
Disable the account {id}.
PUT /admin/users/{id}/suspend.json Suspend a user for a period · Suspend a user #
Ask an LLM
“How do I suspend a user for a set time?”
“Can I suspend a member with a reason and a message?”
Tell an agent
Suspend user {id} until {suspend_until} because {reason}.
Suspend {id} until {suspend_until} with reason {reason} and message {message}.
PUT /admin/users/{id}/silence.json Silence a user · Silence a user #
Ask an LLM
“How do I silence a user so they can't post?”
“Can I silence a member for a set time?”
Tell an agent
Silence user {id} until {silenced_till} because {reason}.
Silence {id} until {silenced_till} with reason {reason} and message {message}.
PUT /admin/users/{id}/anonymize.json Anonymize a user's account · Anonymize a user #
Ask an LLM
“How do I anonymize a user's account?”
“Can I scrub a member's personal data while keeping their posts?”
Tell an agent
Anonymize user {id}.
Anonymize the account {id}.
POST /admin/users/{id}/log_out.json Log a user out of all sessions · Log a user out #
Ask an LLM
“How do I force a user to log out everywhere?”
“Can I revoke all of a member's sessions?”
Tell an agent
Log out user {id}.
Force {id} to log out of every session.
POST /user_avatar/{username}/refresh_gravatar.json Refresh a user's gravatar · Refresh gravatar #
Ask an LLM
“How do I force Discourse to reload a user's gravatar?”
“Can I refresh a member's profile picture from Gravatar?”
Tell an agent
Refresh the gravatar for {username}.
Reload {username}'s profile picture from Gravatar.
GET /admin/users.json List all users · List users #
Ask an LLM
“Who are all the users on the forum?”
“Can I list every member, including their email?”
Tell an agent
List all users.
List users with email {email}.
GET /admin/users/list/{flag}.json List users flagged in moderation · List users by flag #
Ask an LLM
“Which users have been flagged for review?”
“Can I list users by a specific flag like spam or suspension?”
Tell an agent
List users flagged {flag}.
Show {flag} users ordered by {order}.
GET /user_actions.json List a user's actions · Get a list of user actions #
Ask an LLM
“What has a particular user done on the site?”
“Can I see the actions a user took, like posting or liking?”
Tell an agent
List {filter} actions for {username}.
Show {username}'s {filter} actions from offset {offset}.
POST /session/forgot_password.json Send a password reset email · Send password reset email #
Ask an LLM
“How do I send a password reset link to a user?”
“Can I trigger a password reset email for a forgotten password?”
Tell an agent
Send a password reset email to {login}.
Email a reset link to {login} for a forgotten password.
PUT /users/password-reset/{token}.json Change a user's password with a reset token · Change password #
Ask an LLM
“How do I set a new password using a reset token?”
“Can I change a user's password once they've requested a reset?”
Tell an agent
Change {username}'s password to {password} using reset token {token}.
Set new password {password} for {username} with token {token}.
GET /u/{username}/emails.json List a user's email addresses · Get email addresses belonging to a user #
Ask an LLM
“What email addresses belong to a user?”
“Can I see all the emails a user has on their account?”
Tell an agent
List email addresses for {username}.
Show the emails on {username}'s account.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/discourse:discourse-users-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

discourse-users-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Discourse API Documentation Users API
  x-logo:
    url: https://docs.discourse.org/logo.svg
  version: latest
  description: This page contains the documentation on how to use Discourse through API calls.
  license:
    name: MIT
    url: https://docs.discourse.org/LICENSE.txt
servers:
- url: https://{defaultHost}
  variables:
    defaultHost:
      default: discourse.example.com
tags:


# --- truncated at 32 KB (138 KB total) ---
# Full source: https://artifacts.apis.io/discourse/openapi/discourse-users-api-openapi.yml