Unmarkdown Documents API

The Documents API from Unmarkdown, for documents.

GitHub OpenAPI

Operations 8

POST /documents Create a new document #
GET /documents List your documents #
GET /documents/{id} Get a document #
PATCH /documents/{id} Update a document #
DELETE /documents/{id} Delete a document #
POST /documents/{id}/publish Publish a document #
DELETE /documents/{id}/publish Unpublish a document #
POST /documents/publish Create and publish a document in one call #

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/unmarkdown-com:unmarkdown-com-documents-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

unmarkdown-com-documents-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Unmarkdown Documents API
  version: 1.0.0
  description: Markdown publishing platform API. Turn markdown into beautiful, hosted web pages in one API call. Supports 62 templates, Mermaid diagrams, Chart.js charts, Graphviz graphs, KaTeX math, and more.
  contact:
    name: Unmarkdown
    url: https://unmarkdown.com/developers
servers:
- url: https://api.unmarkdown.com/v1
  description: Production
security:
- bearerAuth: []
tags:
- name: Documents
paths:
  /documents:
    post:
      operationId: createDocument
      summary: Create a new document
      description: Creates a new document saved to your account. The document is not published. Use POST /documents/{id}/publish to publish it, or use POST /documents/publish to create and publish in one call.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDocumentRequest'
            example:
              title: My Document
              content: '# Hello


                This is my document.'
              template_id: executive
              theme_mode: light
      responses:
        '201':
          description: Document created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateDocumentResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
      tags:
      - Documents
    get:
      operationId: listDocuments
      summary: List your documents
      description: Returns a paginated list of your documents, ordered by most recently updated. Use cursor-based pagination for large document lists. Does not count toward your monthly usage quota.
      parameters:
      - name: limit
        in: query
        description: Max results per page (1-100)
        schema:
          type: integer
          default: 20
          minimum: 1
          maximum: 100
      - name: cursor
        in: query
        description: ISO timestamp cursor from previous response's next_cursor
        schema:
          type: string
          format: date-time
      responses:
        '200':
          description: Document list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentListResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
      tags:
      - Documents
  /documents/{id}:
    get:
      operationId: getDocument
      summary: Get a document
      description: Returns a single document with full content. Only returns documents you own. Does not count toward your monthly usage quota.
      parameters:
      - $ref: '#/components/parameters/documentId'
      responses:
        '200':
          description: Document details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
      tags:
      - Documents
    patch:
      operationId: updateDocument
      summary: Update a document
      description: Updates one or more fields of an existing document. Only include the fields you want to change.
      parameters:
      - $ref: '#/components/parameters/documentId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDocumentRequest'
            example:
              title: Updated Title
              content: '# Updated


                New content here.'
      responses:
        '200':
          description: Document updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateDocumentResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
      tags:
      - Documents
    delete:
      operationId: deleteDocument
      summary: Delete a document
      description: Permanently deletes a document. If the document is published, it will be unpublished first. This action cannot be undone.
      parameters:
      - $ref: '#/components/parameters/documentId'
      responses:
        '200':
          description: Document deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
      tags:
      - Documents
  /documents/{id}/publish:
    post:
      operationId: publishDocument
      summary: Publish a document
      description: Publishes an existing document, making it accessible via a public URL. If already published, updates the published version. The document must exist and belong to you.
      parameters:
      - $ref: '#/components/parameters/documentId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublishRequest'
            example:
              description: A guide to getting started
              visibility: link
      responses:
        '200':
          description: Document published
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublishResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: Slug conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
      tags:
      - Documents
    delete:
      operationId: unpublishDocument
      summary: Unpublish a document
      description: Removes a document from public access. The document itself is not deleted and can be re-published later.
      parameters:
      - $ref: '#/components/parameters/documentId'
      responses:
        '200':
          description: Document unpublished
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  is_published:
                    type: boolean
                    example: false
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
      tags:
      - Documents
  /documents/publish:
    post:
      operationId: createAndPublishDocument
      summary: Create and publish a document in one call
      description: Creates a new document and immediately publishes it. Returns the published URL. This is the most common endpoint for programmatic publishing. Equivalent to calling POST /documents followed by POST /documents/{id}/publish.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAndPublishRequest'
            example:
              title: Weekly Report
              content: '# Weekly Report


                ## Summary


                Key highlights from this week...'
              template_id: executive
              theme_mode: light
      responses:
        '201':
          description: Document created and published
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublishResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          description: Slug conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
      tags:
      - Documents
components:
  schemas:
    PublishResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        title:
          type: string
        published_url:
          type: string
          format: uri
        published_at:
          type: string
          format: date-time
        template_id:
          type: string
        word_count:
          type: integer
        reading_time_minutes:
          type: integer
    CreateAndPublishRequest:
      type: object
      required:
      - content
      properties:
        content:
          type: string
          description: Markdown content
        title:
          type: string
          default: Untitled
        template_id:
          type: string
          default: swiss
        theme_mode:
          type: string
          enum:
          - light
          - dark
          default: light
        slug:
          type: string
          description: Custom URL slug (Pro only)
        description:
          type: string
    DocumentResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        title:
          type: string
        content:
          type: string
        template_id:
          type: string
        theme_mode:
          type: string
        is_published:
          type: boolean
        slug:
          type: string
          nullable: true
        published_at:
          type: string
          format: date-time
          nullable: true
        description:
          type: string
          nullable: true
        page_width:
          type: string
          nullable: true
        visibility:
          type: string
          nullable: true
        word_count:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    PublishRequest:
      type: object
      properties:
        slug:
          type: string
          description: Custom URL slug (Pro only)
        description:
          type: string
          description: SEO description
        hide_badge:
          type: boolean
          description: Hide Unmarkdown badge (Pro only)
        visibility:
          type: string
          enum:
          - link
          - public
          description: Access level (public is Pro only)
        page_width:
          type: string
          enum:
          - standard
          - wide
          - full
    DocumentSummary:
      type: object
      properties:
        id:
          type: string
          format: uuid
        title:
          type: string
        template_id:
          type: string
        theme_mode:
          type: string
        is_published:
          type: boolean
        slug:
          type: string
          nullable: true
        page_width:
          type: string
          nullable: true
        word_count:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    UpdateDocumentResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        title:
          type: string
        template_id:
          type: string
        theme_mode:
          type: string
        page_width:
          type: string
          nullable: true
        updated_at:
          type: string
          format: date-time
    UpdateDocumentRequest:
      type: object
      properties:
        title:
          type: string
        content:
          type: string
        template_id:
          type: string
        theme_mode:
          type: string
          enum:
          - light
          - dark
        description:
          type: string
          nullable: true
        page_width:
          type: string
          enum:
          - standard
          - wide
          - full
    CreateDocumentResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        title:
          type: string
        template_id:
          type: string
        theme_mode:
          type: string
        created_at:
          type: string
          format: date-time
    DocumentListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/DocumentSummary'
        has_more:
          type: boolean
        next_cursor:
          type: string
          format: date-time
          nullable: true
    CreateDocumentRequest:
      type: object
      properties:
        title:
          type: string
          description: Document title
        content:
          type: string
          description: Markdown content
        template_id:
          type: string
          default: swiss
          description: Template ID
        theme_mode:
          type: string
          enum:
          - light
          - dark
          default: light
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            status:
              type: integer
          required:
          - code
          - message
          - status
  responses:
    Forbidden:
      description: Insufficient permissions or tier
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: forbidden
              message: Custom slugs are a Pro feature
              status: 403
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: not_found
              message: Document not found
              status: 404
    RateLimited:
      description: Rate limit or quota exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: rate_limited
              message: 'Rate limit exceeded. Limit: 10 req/sec'
              status: 429
    BadRequest:
      description: Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: validation_error
              message: markdown field is required
              status: 400
    Unauthorized:
      description: Authentication required
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: unauthorized
              message: 'Missing Authorization header. Use: Bearer um_your_key'
              status: 401
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: internal_error
              message: An unexpected error occurred
              status: 500
  parameters:
    documentId:
      name: id
      in: path
      required: true
      description: Document UUID
      schema:
        type: string
        format: uuid
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key with um_ prefix. Create keys in Settings > API tab.