MDflow Workspaces API

The Workspaces API from MDflow — 2 operation(s) for workspaces.

GitHub OpenAPI

Operations 4

GET /api/v1/workspaces List workspaces #
POST /api/v1/workspaces Create a workspace #
PATCH /api/v1/workspaces/{id} Update a workspace #
DELETE /api/v1/workspaces/{id} Delete a workspace #

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/mdflow-cz:mdflow-cz-workspaces-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

mdflow-cz-workspaces-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: MDflow Public Workspaces API
  version: 1.0.0
  description: 'HTTP API for reading and writing workspaces, folders, and markdown documents in MDflow. The personal API under /api/v1 authenticates with a Personal Access Token (mdf_…) or an OAuth access token and requires MDflow Pro. The Team API under /api/team/v1 is the content surface of an MDflow Team account: it authenticates with a Team access token (mdt_…) that is bound to one Team account, granted only the workspaces picked at creation, capped at read-only or read-and-write, and re-checked against the creator''s live membership, role, workspace permission, and the account''s access state on every request. Personal tokens are rejected on Team routes and Team tokens on personal routes.'
servers:
- url: https://mdflow.cz
  description: Production
- url: http://localhost:3000
  description: Local development
security:
- personalAccessToken: []
tags:
- name: Workspaces
paths:
  /api/v1/workspaces:
    get:
      operationId: listWorkspaces
      summary: List workspaces
      description: Returns all workspaces owned by the authenticated user, oldest first.
      tags:
      - Workspaces
      responses:
        '200':
          description: Workspace list.
          headers:
            Cache-Control:
              $ref: '#/components/headers/NoStore'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Workspace'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
    post:
      operationId: createWorkspace
      summary: Create a workspace
      description: Creates a workspace owned by the authenticated user. Duplicate names are automatically disambiguated.
      tags:
      - Workspaces
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWorkspaceInput'
      responses:
        '201':
          description: Created workspace.
          headers:
            Cache-Control:
              $ref: '#/components/headers/NoStore'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Workspace'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
  /api/v1/workspaces/{id}:
    patch:
      operationId: updateWorkspace
      summary: Update a workspace
      description: Updates the name and/or description of a workspace owned by the authenticated user. Provide at least one field. A renamed workspace is disambiguated against the other workspaces.
      tags:
      - Workspaces
      parameters:
      - $ref: '#/components/parameters/WorkspaceId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateWorkspaceInput'
      responses:
        '200':
          description: Updated workspace.
          headers:
            Cache-Control:
              $ref: '#/components/headers/NoStore'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Workspace'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/WorkspaceNotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
    delete:
      operationId: deleteWorkspace
      summary: Delete a workspace
      description: Deletes a workspace owned by the authenticated user, cascading to its folders and their documents. The owner's only remaining workspace cannot be deleted.
      tags:
      - Workspaces
      parameters:
      - $ref: '#/components/parameters/WorkspaceId'
      responses:
        '204':
          $ref: '#/components/responses/Deleted'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/WorkspaceNotFound'
        '409':
          $ref: '#/components/responses/CannotDeleteLastWorkspace'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    CreateWorkspaceInput:
      type: object
      additionalProperties: false
      required:
      - name
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 100
        description:
          type: string
          maxLength: 5000
    Workspace:
      type: object
      additionalProperties: false
      required:
      - id
      - name
      - description
      - created_at
      - updated_at
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        description:
          type:
          - string
          - 'null'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      additionalProperties: false
      required:
      - error
      properties:
        error:
          type: string
        message:
          type: string
          description: Optional human-readable guidance for resolving the error, included on authentication (401) and authorization (403) failures.
    UpdateWorkspaceInput:
      type: object
      additionalProperties: false
      minProperties: 1
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 100
        description:
          type: string
          maxLength: 5000
  headers:
    RetryAfter:
      description: Seconds to wait before retrying after a rate-limit response.
      schema:
        type: integer
        minimum: 1
    WwwAuthenticate:
      description: RFC 6750 Bearer challenge carrying a `resource_metadata` parameter (RFC 9728) that points to `/.well-known/oauth-protected-resource` for OAuth discovery. `Bearer realm="MDflow", resource_metadata="…"` when credentials are missing, or one that also includes `error="invalid_token"` with an `error_description` when a token was rejected.
      schema:
        type: string
    NoStore:
      description: API responses are not cacheable.
      schema:
        type: string
        const: no-store
  responses:
    ServerError:
      description: Unexpected server error.
      headers:
        Cache-Control:
          $ref: '#/components/headers/NoStore'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            unexpected:
              value:
                error: Unexpected API error
    BadRequest:
      description: Request body was malformed or failed validation.
      headers:
        Cache-Control:
          $ref: '#/components/headers/NoStore'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            invalidRequestBody:
              value:
                error: Invalid request body
    Deleted:
      description: Deleted successfully. No response body.
      headers:
        Cache-Control:
          $ref: '#/components/headers/NoStore'
    Unauthorized:
      description: Missing, malformed, invalid, or revoked bearer token. The body includes a `message` field with guidance for authenticating, and the response carries a `WWW-Authenticate` challenge.
      headers:
        Cache-Control:
          $ref: '#/components/headers/NoStore'
        WWW-Authenticate:
          $ref: '#/components/headers/WwwAuthenticate'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missingToken:
              value:
                error: Missing or malformed bearer token
                message: 'Authenticate with OAuth (in Claude or ChatGPT connectors, add https://mdflow.cz/api/mcp and complete the sign-in prompt) or with an MDflow Personal Access Token (send an ''Authorization: Bearer mdf_...'' header, created at https://mdflow.cz/settings). Requires an MDflow Pro account. Documentation: https://mdflow.cz/docs/api'
            invalidToken:
              value:
                error: Invalid bearer token
                message: 'Authenticate with OAuth (in Claude or ChatGPT connectors, add https://mdflow.cz/api/mcp and complete the sign-in prompt) or with an MDflow Personal Access Token (send an ''Authorization: Bearer mdf_...'' header, created at https://mdflow.cz/settings). Requires an MDflow Pro account. Documentation: https://mdflow.cz/docs/api'
    CannotDeleteLastWorkspace:
      description: The workspace is the owner's only workspace and cannot be deleted.
      headers:
        Cache-Control:
          $ref: '#/components/headers/NoStore'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            lastWorkspace:
              value:
                error: Cannot delete your last workspace
    WorkspaceNotFound:
      description: Workspace was not found or is not owned by the authenticated user.
      headers:
        Cache-Control:
          $ref: '#/components/headers/NoStore'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            notFound:
              value:
                error: Workspace not found
    Forbidden:
      description: The bearer token is valid but its owner cannot use the API. Agent control (REST + MCP) requires an MDflow Pro plan, so a token owned by a non-Pro account returns 403 on every endpoint. POST /api/v1/documents additionally returns 403 when the account reaches its document limit. The body includes a `message` field with guidance.
      headers:
        Cache-Control:
          $ref: '#/components/headers/NoStore'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            proRequired:
              value:
                error: Pro plan required
                message: 'Authenticate with OAuth (in Claude or ChatGPT connectors, add https://mdflow.cz/api/mcp and complete the sign-in prompt) or with an MDflow Personal Access Token (send an ''Authorization: Bearer mdf_...'' header, created at https://mdflow.cz/settings). Requires an MDflow Pro account. Documentation: https://mdflow.cz/docs/api'
            documentLimit:
              value:
                error: Upgrade to Pro to create more than 100 documents.
    RateLimited:
      description: The token or authenticated user exceeded a 60 requests per minute rate limit.
      headers:
        Cache-Control:
          $ref: '#/components/headers/NoStore'
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            rateLimited:
              value:
                error: Rate limit exceeded
  parameters:
    WorkspaceId:
      name: id
      in: path
      required: true
      description: Workspace UUID.
      schema:
        type: string
        format: uuid
  securitySchemes:
    personalAccessToken:
      type: http
      scheme: bearer
      bearerFormat: PAT
      description: 'Use an MDflow Personal Access Token in the form `Authorization: Bearer mdf_...`.'
    teamAccessToken:
      type: http
      scheme: bearer
      bearerFormat: Team access token
      description: 'Use an MDflow Team access token in the form `Authorization: Bearer mdt_...`. Created by any member on the Team''s API Access page (`/teams/{accountId}/api-access`); bound to one Team account, limited to the workspaces selected at creation, capped at read-only or read-and-write, and re-checked against the creator''s live membership and permissions on every request. Only accepted by the `/api/team/v1` routes.'