HackMD Trash API

Operations for listing and restoring trashed notes.

Operations 4

GET /trash #
PUT /trash/batch-restore #
PUT /trash/{noteId}/restore #
GET /teams/{teampath}/trash #

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/hackmd-trash-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

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

OpenAPI Specification

hackmd-trash-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: HackMD Open History Trash API
  version: 1.0.0
  description: HackMD OpenAPI
  license:
    name: UNLICENSED
  contact:
    name: HackMD Team
    email: support@hackmd.io
servers:
- url: /v1
  description: API Server
tags:
- name: Trash
  description: Operations for listing and restoring trashed notes.
paths:
  /trash:
    get:
      operationId: ListPersonalTrash
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ApiTrashNote'
                type: array
      description: List trashed notes in your personal workspace (same data as the internal trash API).
      tags:
      - Trash
      security:
      - token: []
      parameters: []
  /trash/batch-restore:
    put:
      operationId: BatchRestore
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrashBatchOperationResponse'
        '207':
          description: Multi-Status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrashBatchOperationResponse'
        '404':
          description: Not Found
      description: Restore multiple notes from trash in one request.
      tags:
      - Trash
      security:
      - token: []
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchRestoreTrashBody'
  /trash/{noteId}/restore:
    put:
      operationId: RestoreNote
      responses:
        '204':
          description: No content
      description: Restore a single note from trash.
      tags:
      - Trash
      security:
      - token: []
      parameters:
      - description: Encoded note id of the trashed note.
        in: path
        name: noteId
        required: true
        schema:
          type: string
  /teams/{teampath}/trash:
    get:
      operationId: ListTeamTrash
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ApiTrashNote'
                type: array
      description: List trashed notes in a team workspace (team admin only; same rules as the internal API).
      tags:
      - Trash
      security:
      - token: []
      parameters:
      - description: The path identifier for the team.
        in: path
        name: teampath
        required: true
        schema:
          type: string
components:
  schemas:
    BatchRestoreTrashBody:
      properties:
        noteIds:
          items:
            type: string
          type: array
      required:
      - noteIds
      type: object
      additionalProperties: false
    BatchOperationError:
      enum:
      - NOT_FOUND
      - PERMISSION_DENIED
      - INTERNAL_ERROR
      type: string
    TrashBatchOperationResponse:
      properties: {}
      additionalProperties:
        properties:
          reason:
            $ref: '#/components/schemas/BatchOperationError'
          status:
            type: string
            enum:
            - success
            - failure
        required:
        - status
        type: object
      type: object
    ApiTrashNote:
      properties:
        id:
          type: string
        title:
          type: string
        tags:
          items:
            type: string
          type: array
        deletedAt:
          type: number
          format: double
        ownerId:
          type: string
        teamId:
          type:
          - string
          - 'null'
        shortId:
          type: string
        publishType:
          type: string
        permanentDeletedAt:
          type:
          - number
          - 'null'
          format: double
      required:
      - id
      - title
      - tags
      - deletedAt
      - ownerId
      - teamId
      - shortId
      - publishType
      - permanentDeletedAt
      type: object
      additionalProperties: false
  securitySchemes:
    token:
      type: http
      scheme: bearer