jitprompt Versions API

The Versions API from jitprompt — 3 operation(s) for versions.

GitHub OpenAPI

Operations 3

GET /documents/{document_id}/versions List a document's versions #
GET /documents/{document_id}/versions/{version}/content Get a version's text #
POST /documents/{document_id}/versions/{version}/restore Restore a version #

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/jitprompt-com:jitprompt-com-versions-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. See our Privacy Policy and Terms.

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

OpenAPI Specification

jitprompt-com-versions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: jitprompt Versions API
  version: 0.1.0
  description: 'Manage the documents in a namespace from scripts and CI. Authenticate with the same namespace API key your agents use for MCP: `Authorization: Bearer imcp_...`. The key decides the namespace; every route acts on it alone.


    Guides: https://docs.jitprompt.com'
servers:
- url: https://app.jitprompt.com
tags:
- name: Versions
paths:
  /documents/{document_id}/versions:
    get:
      tags:
      - Versions
      summary: List a document's versions
      description: 'The kept versions of a document, newest (current) first. How many are

        kept depends on the plan (`features.versions_kept` in `GET /usage`).'
      operationId: listVersions
      security:
      - HTTPBearer: []
      parameters:
      - name: document_id
        in: path
        required: true
        schema:
          type: string
          title: Document Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Version'
                title: Response Listversions
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /documents/{document_id}/versions/{version}/content:
    get:
      tags:
      - Versions
      summary: Get a version's text
      description: 'The text of one kept version (for a PDF or Word file, the extracted

        text), as `text/markdown`.'
      operationId: getVersionContent
      security:
      - HTTPBearer: []
      parameters:
      - name: document_id
        in: path
        required: true
        schema:
          type: string
          title: Document Id
      - name: version
        in: path
        required: true
        schema:
          type: integer
          title: Version
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /documents/{document_id}/versions/{version}/restore:
    post:
      tags:
      - Versions
      summary: Restore a version
      description: 'Make a kept version the current content again and re-ingest it. Uses one

        ingestion and records a new version, so the restore can be undone too.'
      operationId: restoreVersion
      security:
      - HTTPBearer: []
      parameters:
      - name: document_id
        in: path
        required: true
        schema:
          type: string
          title: Document Id
      - name: version
        in: path
        required: true
        schema:
          type: integer
          title: Version
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Document:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        namespace_id:
          type: string
          format: uuid
          title: Namespace Id
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
        summary:
          anyOf:
          - type: string
          - type: 'null'
          title: Summary
        source_name:
          type: string
          title: Source Name
        status:
          type: string
          enum:
          - pending
          - parsing
          - structuring
          - embedding
          - ready
          - failed
          title: Status
        error:
          anyOf:
          - type: string
          - type: 'null'
          title: Error
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        section_count:
          type: integer
          title: Section Count
      type: object
      required:
      - id
      - namespace_id
      - title
      - summary
      - source_name
      - status
      - error
      - created_at
      - updated_at
      - section_count
      title: Document
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    Version:
      properties:
        version:
          type: integer
          title: Version
        source_name:
          type: string
          title: Source Name
        size_bytes:
          type: integer
          title: Size Bytes
        kind:
          type: string
          enum:
          - upload
          - replace
          - restore
          - baseline
          title: Kind
        restored_from:
          anyOf:
          - type: integer
          - type: 'null'
          title: Restored From
        created_by:
          anyOf:
          - type: string
          - type: 'null'
          title: Created By
        created_at:
          type: string
          format: date-time
          title: Created At
        current:
          type: boolean
          title: Current
      type: object
      required:
      - version
      - source_name
      - size_bytes
      - kind
      - restored_from
      - created_by
      - created_at
      - current
      title: Version
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
      description: A namespace API key (`imcp_...`), created on the namespace's API keys page.