jitprompt Documents API

The Documents API from jitprompt — 5 operation(s) for documents.

GitHub OpenAPI

Operations 9

GET /documents List documents #
POST /documents Upload a document #
GET /documents/{document_id} Get a document #
PATCH /documents/{document_id} Rename a document #
DELETE /documents/{document_id} Delete a document #
POST /documents/{document_id}/reingest Re-ingest a document #
GET /documents/{document_id}/content Get a document's text #
PUT /documents/{document_id}/content Replace a document's content #
GET /documents/{document_id}/sections List a document's sections #

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-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. See our Privacy Policy and Terms.

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

OpenAPI Specification

jitprompt-com-documents-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: jitprompt Documents 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: Documents
paths:
  /documents:
    get:
      tags:
      - Documents
      summary: List documents
      description: Every document in the key's namespace, newest first, with its status.
      operationId: listDocuments
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Document'
                type: array
                title: Response Listdocuments
      security:
      - HTTPBearer: []
    post:
      tags:
      - Documents
      summary: Upload a document
      description: 'Upload a Markdown, text, PDF or Word file as multipart form data

        (`file`, and optionally `title`). Ingestion starts at once; poll the

        document until its `status` is `ready` or `failed`. Identical content to a

        document already in the namespace returns that document with

        `deduped: true` and uses no ingestion. Counts against the plan''s documents

        per namespace, ingestions per day and document size (402/413).'
      operationId: uploadDocument
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_uploadDocument'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Uploaded'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /documents/{document_id}:
    get:
      tags:
      - Documents
      summary: Get a document
      description: 'One document: title, source file name, status (`pending`, `parsing`,

        `structuring`, `embedding`, `ready`, `failed`), the error if it failed,

        its one-line summary and section count.'
      operationId: getDocument
      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:
                $ref: '#/components/schemas/Document'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - Documents
      summary: Rename a document
      description: Change the title. Does not re-ingest; `null` clears it.
      operationId: renameDocument
      security:
      - HTTPBearer: []
      parameters:
      - name: document_id
        in: path
        required: true
        schema:
          type: string
          title: Document Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TitlePatch'
      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'
    delete:
      tags:
      - Documents
      summary: Delete a document
      description: 'Delete the document, its sections and its stored file. Agents stop

        seeing it immediately.'
      operationId: deleteDocument
      security:
      - HTTPBearer: []
      parameters:
      - name: document_id
        in: path
        required: true
        schema:
          type: string
          title: Document Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /documents/{document_id}/reingest:
    post:
      tags:
      - Documents
      summary: Re-ingest a document
      description: 'Run ingestion again on the stored file — to retry a failure. Uses one

        ingestion (a failure on our side gives it back).'
      operationId: reingestDocument
      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:
                $ref: '#/components/schemas/Document'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /documents/{document_id}/content:
    get:
      tags:
      - Documents
      summary: Get a document's text
      description: 'The document''s text as the model structured it (for a PDF or Word file,

        the extracted text), as `text/markdown`.'
      operationId: getDocumentContent
      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: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    put:
      tags:
      - Documents
      summary: Replace a document's content
      description: 'Replace the source and re-ingest. Send either multipart/form-data with a

        `file` field (a new filename is kept), or the raw text as the body with any

        text/* content type (the filename stays).'
      operationId: replaceDocumentContent
      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:
                $ref: '#/components/schemas/Document'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /documents/{document_id}/sections:
    get:
      tags:
      - Documents
      summary: List a document's sections
      description: 'The sections the model made, in order: id, title, summary and token

        count — and the full text with `content=true`. These are what agents read.'
      operationId: listSections
      security:
      - HTTPBearer: []
      parameters:
      - name: document_id
        in: path
        required: true
        schema:
          type: string
          title: Document Id
      - name: content
        in: query
        required: false
        schema:
          type: boolean
          default: false
          title: Content
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Section'
                title: Response Listsections
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    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
    Section:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        position:
          type: integer
          title: Position
        title:
          type: string
          title: Title
        summary:
          type: string
          title: Summary
        token_count:
          type: integer
          title: Token Count
        content:
          anyOf:
          - type: string
          - type: 'null'
          title: Content
      type: object
      required:
      - id
      - position
      - title
      - summary
      - token_count
      title: Section
    Body_uploadDocument:
      properties:
        file:
          type: string
          contentMediaType: application/octet-stream
          title: File
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
      type: object
      required:
      - file
      title: Body_uploadDocument
    TitlePatch:
      properties:
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
      type: object
      title: TitlePatch
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Uploaded:
      properties:
        document_id:
          type: string
          format: uuid
          title: Document Id
        status:
          type: string
          enum:
          - pending
          - parsing
          - structuring
          - embedding
          - ready
          - failed
          title: Status
        deduped:
          type: boolean
          title: Deduped
      type: object
      required:
      - document_id
      - status
      - deduped
      title: Uploaded
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
      description: A namespace API key (`imcp_...`), created on the namespace's API keys page.