HTTP API

Everything the app does is available over HTTPS at https://api.1dotmd.ai/v1. The interactive reference with every endpoint and schema lives at https://api.1dotmd.ai/docs.

Authentication

  • Agents and scripts send an agent key as a bearer token: Authorization: Bearer 1dk_…. Keys are issued in the app under Agents; what a key can do is defined by its agent’s grants.
  • People are authenticated by the app’s session when they use the web interface; the API accepts the same session tokens.

Requests without a valid credential get 401. Requests for something you may not access get 403 with the decision attached, or 404 when the workspace or context is not visible to you at all.

Examples

List the artifacts in a folder:

curl -H "Authorization: Bearer 1dk_your_key" \
  "https://api.1dotmd.ai/v1/workspaces/northwind/contexts/product/artifacts?path=notes"

Push a new version with one artifact:

curl -X POST "https://api.1dotmd.ai/v1/workspaces/northwind/contexts/product/pushes" \
  -H "Authorization: Bearer 1dk_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "note": "Add meeting notes",
    "expected_version": 7,
    "operations": [
      { "op": "put", "path": "notes/2026-10-10.md", "text": "# Notes\n" }
    ]
  }'

The response is the new version: its number, note, provenance, statistics and address. Binary content goes in content_base64 instead of text; delete and move operations take a path or from_path/to_path.

Versions and concurrency

Pass expected_version with the version you read before making changes. If the context moved on in the meantime the push is refused with 409, so nothing is overwritten silently. Omit it to always push on top of the latest version.

Main endpoints

EndpointPurpose
GET /v1/meWho you are and the workspaces you belong to.
GET /v1/workspaces/{workspace}A workspace by address.
GET|POST /v1/workspaces/{workspace}/contextsList or create contexts.
POST /v1/workspaces/{workspace}/contexts/{context}/pushesPush a new version (put, delete, move operations).
GET /v1/workspaces/{workspace}/contexts/{context}/versionsHistory with provenance; filter by actor or provider.
GET /v1/workspaces/{workspace}/contexts/{context}/artifactsList artifacts at a path and version.
GET /v1/workspaces/{workspace}/contexts/{context}/artifacts/{path}Read an artifact (text inline, metadata otherwise).
GET /v1/workspaces/{workspace}/contexts/{context}/raw/{path}Download the bytes of an artifact.
GET|POST /v1/workspaces/{workspace}/contexts/{context}/grantsList or create grants; DELETE revokes one.
GET|POST /v1/workspaces/{workspace}/agentsAgents and, under /keys, their keys.
GET /v1/workspaces/{workspace}/activityThe activity trail.
GET /v1/workspaces/{workspace}/exportThe portable archive of a workspace (also per context).

Limits

  • A single push can carry up to 50 MB and 500 operations.
  • Artifacts above 1 MB are stored as large files; they read and download exactly like any other.
  • Text previews are capped at 256 KB; use the raw endpoint for the full content.

Addresses in responses

Every artifact and version in a response carries its 1dotmd:// address and its url (the link the app serves); artifacts also carry a download_url pointing at the raw endpoint. A share key can be passed as ?share= or the X-Share-Key header instead of a bearer token. Results can be handed to people, documents and agents without translation. See Concepts for the address forms.