Mattermost Posts API

The Posts API from Mattermost — 9 operation(s) for posts.

GitHub OpenAPI

Operations 11

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 /channels/{channel_id}/posts List posts in a channel · List posts in a channel #
Ask an LLM
“What messages have been posted in a channel recently?”
“Can I list channel posts posted after a certain time?”
Tell an agent
List posts in channel {channel_id}.
Show channel {channel_id} posts since {since}.
POST /posts Post a message in a channel · Create a post #
Ask an LLM
“How do I post a message in a Mattermost channel?”
“Can I post a message as a specific user?”
Tell an agent
Post {message} in channel {channel_id}.
Send a message as user {user_id} in channel {channel_id}.
POST /posts/ephemeral Send an ephemeral post · Create an ephemeral post #
Ask an LLM
“Can I post a message that only the sender sees?”
“How do I send an ephemeral post to a user?”
Tell an agent
Send ephemeral post {post} to user {user_id}.
Show {post} as an ephemeral message.
GET /posts/{post_id} Get a post · Get a post #
Ask an LLM
“What does a specific post say?”
“Can I fetch one post by its ID?”
Tell an agent
Get post {post_id}.
Show the message of post {post_id}.
PUT /posts/{post_id} Edit a post · Update a post #
Ask an LLM
“How do I edit a post I already sent?”
“Can I change the text of an existing post?”
Tell an agent
Edit post {post_id} to say {message}.
Replace the text of post {post_id}.
DELETE /posts/{post_id} Delete a post · Delete a post #
Ask an LLM
“How do I delete a post from a channel?”
“Can I remove a message someone posted?”
Tell an agent destructive · confirm first
Delete post {post_id}.
Remove the message {post_id}.
PUT /posts/{post_id}/patch Patch a post's text · Patch a post #
Ask an LLM
“Can I change just part of a post's text?”
“Is there a partial update for a post?”
Tell an agent
Patch post {post_id} with {message}.
Change only the text of post {post_id}.
GET /posts/{post_id}/thread Get a thread · Get a thread by post id #
Ask an LLM
“What replies are in a thread?”
“Can I see the full conversation starting from one post?”
Tell an agent
Get the thread starting at post {post_id}.
Show replies to post {post_id}.
POST /posts/{post_id}/pin Pin a post · Pin a post #
Ask an LLM
“How do I pin a post so it stays at the top of a channel?”
“Can I pin a message for everyone to see?”
Tell an agent
Pin post {post_id}.
Pin the message {post_id} so it stays pinned.
POST /posts/{post_id}/unpin Unpin a post · Unpin a post #
Ask an LLM
“How do I unpin a post from a channel?”
“Can I remove a pinned message?”
Tell an agent
Unpin post {post_id}.
Unpin the message {post_id}.
POST /teams/{team_id}/posts/search Search posts across a team · Search posts in a team #
Ask an LLM
“How do I search a team's posts for a keyword?”
“Can I search all channels in a team at once?”
Tell an agent
Search team {team_id} posts for {terms}.
Find team {team_id} messages matching {terms}.

Specifications

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/mattermost:mattermost-posts-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

mattermost-posts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mattermost REST Posts API
  version: '4'
  description: 'Mattermost REST API v4 for managing users, teams, channels, posts, threads,

    files, integrations, plugins, webhooks, slash commands, and OAuth

    applications on a self-hosted or cloud Mattermost server. Authentication

    uses Personal Access Tokens or session tokens carried as a Bearer token.'
  contact:
    name: Mattermost API Documentation
    url: https://developers.mattermost.com/api-documentation
servers:
- url: https://{your-mattermost-server}/api/v4
  description: Self-hosted Mattermost server
  variables:
    your-mattermost-server:
      default: your-mattermost-server.com
      description: Hostname of your Mattermost server
security:
- bearerAuth: []
tags:
- name: Posts
paths:
  /channels/{channel_id}/posts:
    get:
      tags:
      - Posts
      summary: List posts in a channel
      parameters:
      - in: path
        name: channel_id
        required: true
        schema:
          type: string
      - in: query
        name: page
        schema:
          type: integer
          default: 0
      - in: query
        name: per_page
        schema:
          type: integer
          default: 60
      - in: query
        name: since
        schema:
          type: integer
      responses:
        '200':
          description: Post list
      operationId: getChannelsByChannelIdPosts
      x-operation-id-source: derived
  /posts:
    post:
      tags:
      - Posts
      summary: Create a post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Post'
      responses:
        '201':
          description: Post created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Post'
      operationId: postPosts
      x-operation-id-source: derived
  /posts/ephemeral:
    post:
      tags:
      - Posts
      summary: Create an ephemeral post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                user_id:
                  type: string
                post:
                  $ref: '#/components/schemas/Post'
      responses:
        '201':
          description: Ephemeral post created
      operationId: postPostsEphemeral
      x-operation-id-source: derived
  /posts/{post_id}:
    parameters:
    - in: path
      name: post_id
      required: true
      schema:
        type: string
    get:
      tags:
      - Posts
      summary: Get a post
      responses:
        '200':
          description: Post
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Post'
      operationId: getPostsByPostId
      x-operation-id-source: derived
    put:
      tags:
      - Posts
      summary: Update a post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Post'
      responses:
        '200':
          description: Updated post
      operationId: putPostsByPostId
      x-operation-id-source: derived
    delete:
      tags:
      - Posts
      summary: Delete a post
      responses:
        '200':
          description: Deleted
      operationId: deletePostsByPostId
      x-operation-id-source: derived
  /posts/{post_id}/patch:
    put:
      tags:
      - Posts
      summary: Patch a post
      parameters:
      - in: path
        name: post_id
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Post'
      responses:
        '200':
          description: Patched post
      operationId: putPostsByPostIdPatch
      x-operation-id-source: derived
  /posts/{post_id}/thread:
    get:
      tags:
      - Posts
      summary: Get a thread by post id
      parameters:
      - in: path
        name: post_id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Thread
      operationId: getPostsByPostIdThread
      x-operation-id-source: derived
  /posts/{post_id}/pin:
    post:
      tags:
      - Posts
      summary: Pin a post
      parameters:
      - in: path
        name: post_id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Pinned
      operationId: postPostsByPostIdPin
      x-operation-id-source: derived
  /posts/{post_id}/unpin:
    post:
      tags:
      - Posts
      summary: Unpin a post
      parameters:
      - in: path
        name: post_id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Unpinned
      operationId: postPostsByPostIdUnpin
      x-operation-id-source: derived
  /teams/{team_id}/posts/search:
    post:
      tags:
      - Posts
      summary: Search posts in a team
      parameters:
      - in: path
        name: team_id
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                terms:
                  type: string
                is_or_search:
                  type: boolean
      responses:
        '200':
          description: Search results
      operationId: postTeamsByTeamIdPostsSearch
      x-operation-id-source: derived
components:
  schemas:
    Post:
      type: object
      properties:
        id:
          type: string
        channel_id:
          type: string
        user_id:
          type: string
        message:
          type: string
        type:
          type: string
        props:
          type: object
        root_id:
          type: string
        create_at:
          type: integer
        update_at:
          type: integer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Personal Access Token or session token issued by /users/login.