Kosmobids Public API

Kosmobids Public API

Company-scoped HTTP API and MCP server for tender search, pipeline data and pipeline updates, tender documents, document analysis, and comments.

The Kosmobids Public API gives a company programmatic access to the same tender data and document workflows that power the Kosmobids application. It is designed for server-side integrations, internal tools, and AI agents that need structured procurement data rather than a user interface.

The same operations are available over two transports: a REST API under /api/v1 and an MCP server at /mcp. They share authentication, company scoping, rate limits, results, and errors. See the MCP server reference for connection details and the tool list.

What you can do

Capability HTTP endpoints
Read the company pipeline GET /pipeline
Move, tag, and archive pipeline tenders GET /pipeline/stages, PUT /pipeline/:id/stage, PUT /pipeline/:id/tags, POST/DELETE /pipeline/:id/archive
Add a company-private tender POST /pipeline/private-tenders
Run ad-hoc searches POST /search
Manage saved searches and matching runs /saved-searches and /saved-searches/:id/runs
Read tender, notice, and look-alike data /tenders/*, /notices/:noticeId
Upload, download, and read tender documents POST/GET /tenders/:id/files, /files/:id/download, /documents/:id
Analyze documents with citations POST /tenders/:id/analyze, GET /analyses/:workflowId
Post comments POST /tenders/:id/api-comments

The interactive reference is at the site root (/). The generated OpenAPI document is at /api/v1/schema. A machine-readable documentation index is at /llms.txt.

Transports

Transport Endpoint Auth Best for
HTTP https://api.kosmobids.com/api/v1 x-api-key header Server-side integrations, CI, uploads and downloads, any language
MCP https://api.kosmobids.com/mcp Authorization: Bearer or x-api-key AI clients and agents that speak Model Context Protocol

Both transports expose the same operations and the same results. Multipart uploads and binary downloads are HTTP-only because MCP tools carry JSON. See the MCP server reference for the tool list and transport differences.

Base URL and versioning

https://api.kosmobids.com/api/v1

The version is part of the path. Changes within v1 are additive: new fields and endpoints may appear, but existing fields keep their meaning. Treat unknown response fields as forward-compatible and do not rely on field order.

Authentication

Send your API key in the x-api-key header on every authenticated request (GET /api/v1/status is public):

curl https://api.kosmobids.com/api/v1/pipeline \
  -H "x-api-key: $KOSMOBIDS_API_KEY"

API keys are issued per company. Never expose a key in a browser, mobile app, or public repository; make requests from a server you control. See Authentication and company scoping for the full model.

Over MCP, send the same key as Authorization: Bearer $KOSMOBIDS_API_KEY (or x-api-key). The key still determines the company; tools never accept a company ID.

Response envelope

Successful responses wrap the payload in data and set error to null:

{
  "data": {
    "tenders": [],
    "nextCursor": null,
    "hasMore": false
  },
  "error": null
}

Validation failures return HTTP 422 with the opposite shape:

{
  "data": null,
  "error": [
    { "field": "body.questions", "type": "body", "message": "Too small: expected array to have >=1 items" }
  ]
}

The binary download endpoint (GET /files/:fileId/download) returns the file stream, not a JSON envelope.

Status codes

Status Meaning
200 Success.
201 Resource created (saved search, comment).
202 Asynchronous work accepted (download or analysis scheduled).
400 / 422 Request validation failed. The public API normalises private validation errors to 422.
401 Missing or invalid API key.
403 The key is not allowed to use the endpoint, or the key has no company scope.
404 The resource does not exist or belongs to another company.
409 A business rule was violated, such as the saved-search limit or documents not being ready.
500 Unexpected server error, including internal service-authentication failures.
502 The internal service request failed.
503 A required backend service is not configured or unavailable.

Asynchronous operations

Three workflows are asynchronous and must be polled:

  • Tender document download (POST /tenders/:tenderId/documents/download).
  • Saved-search matching runs (POST /saved-searches/:savedSearchId/runs).
  • Document analysis (POST /tenders/:tenderId/analyze).

There are no webhooks in v1. See Asynchronous work and polling for status values, final-state detection, and backoff guidance. Over MCP, the same endpoints are tools that return the run or workflow ID; poll list_saved_search_run_matches or get_document_analysis.

Start here

  1. Quickstart: make your first request and read the envelope.
  2. Read the pipeline: cursor pagination and every pipeline field.
  3. Update the pipeline: move stages, replace tags, archive and restore.
  4. Find and qualify tenders: search, hydrate, and interpret relevance.
  5. Automate a saved search: create a saved search, run it, and poll results.
  6. Download and read documents: trigger a download and read OCR pages.
  7. Analyze and cite: ask questions and resolve citations.
  8. Look-alike discovery: expand from a strong tender.
  9. Build an agent: orchestrate the full flow.
  10. Connect an MCP client: connect with Bearer auth, list the tools, and choose where MCP stops and HTTP takes over.

See the changelog for API changes.

Operational endpoints

GET /health and GET /api/v1/status are unauthenticated. /health returns process health; /api/v1/status is a lightweight readiness check that does not require an API key.