Docs / REST API

The Archreactor API.

Read your architecture diagrams as JSON: components, connections, walkthroughs, data flows and saved versions. The System Design Library is open without a key.

01Overview

The REST API returns the same data as our MCP server, as JSON over HTTPS. Use it from a script, a CI job or your own tooling.

Base address: https://api.archreactor.app
Version: every path starts with /v1. We aim to keep /v1 stable: we add fields, and avoid removing or renaming them.

02Authentication

Create a key under Settings, API keys and send it in the Authorization header. The library routes need no key.

Request
curl -s https://api.archreactor.app/v1/diagrams \
  -H "Authorization: Bearer ar_live_YOUR_KEY"
Response
{
  "total": 2,
  "diagrams": [
    {
      "id": "0b9f6c1e-5d2a-4f7b-9c3e-8a1d2e3f4a5b",
      "name": "Checkout platform",
      "components": 14,
      "connections": 19,
      "createdAt": "2026-10-02T09:14:07.000Z",
      "updatedAt": "2026-11-12T16:40:21.000Z"
    }
  ]
}

The key decides the workspace. No route takes a workspace id, and a key cannot read another workspace. A key has the read scope, and the write scope too if you chose it when creating the key.

03Routes

RouteParametersNeedsReturns
GET /v1/libraryq, limitNo keySearch the System Design Library.
GET /v1/library/{slug}noneNo keyOne library entry in full.
GET /v1/diagramsnoneKeyThe workspace's diagrams.
GET /v1/diagrams/{id}noneKeyComponents and connections.
GET /v1/diagrams/{id}/walkthroughwalkthroughIdKeyThe walkthrough, step by step.
GET /v1/diagrams/{id}/data-flowminSensitivityKeySensitive data and trust-boundary crossings.
GET /v1/diagrams/{id}/sequenceformatKeyMermaid or PlantUML source.
GET /v1/diagrams/{id}/versionsnoneKeySaved versions and their reviews.
GET /v1/diagrams/{id}/versions/comparefrom, toKeyWhat changed between two versions.
POST /v1/diagrams/{id}/versionslabel, note (JSON body)Key with writeSave the diagram as a new version.
GET /v1/componentsqKeyFind components across diagrams.

Parameters

  • minSensitivity: the least sensitive data to include. One of all, internal, personal (the default), credentials, financial, cardholder, health.
  • format: mermaid (the default) or plantuml.
  • from, to: version numbers as the versions route lists them (1, 2, 3). to defaults to current, the diagram as it is now.
  • q: search text. For components, at least two characters. For the library, empty lists every entry.
  • walkthroughId: another walkthrough of the same diagram, from otherWalkthroughs in the walkthrough response.

04Examples

What cardholder data crosses a trust boundary?

Request
curl -s "https://api.archreactor.app/v1/diagrams/DIAGRAM_ID/data-flow?minSensitivity=cardholder" \
  -H "Authorization: Bearer ar_live_YOUR_KEY"
Response
{
  "diagramName": "Checkout platform",
  "minSensitivity": "cardholder",
  "coverage": {
    "components": 14,
    "componentsWithZone": 12,
    "zonesSuggestedByAi": 3,
    "connections": 19,
    "connectionsWithDataClasses": 11,
    "dataClassesSuggestedByAi": 2
  },
  "crossingCount": 1,
  "flowCount": 2,
  "flows": [
    {
      "from": "Payments API",
      "fromZone": "Internal network",
      "to": "Card vault",
      "toZone": "Restricted (sensitive data)",
      "label": "tokenise",
      "dataClasses": ["Cardholder data"],
      "crossesTrustBoundary": "yes",
      "direction": "into a more trusted zone",
      "dataClassesSuggestedByAi": false
    }
  ]
}

coverage says how much of the diagram has zones and data classes set at all. A diagram with nothing tagged returns no flows; that is missing information, not evidence that no sensitive data moves.

Search the library (no key)

Request
curl -s "https://api.archreactor.app/v1/library?q=chat"

Save a version (needs the write scope)

Request
curl -s -X POST https://api.archreactor.app/v1/diagrams/DIAGRAM_ID/versions \
  -H "Authorization: Bearer ar_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"label":"Before the Q3 review"}'

Saving a version changes nothing in the diagram and uses no AI credits. It counts toward the plan's saved versions per diagram.

05Errors

Errors are JSON with a code and a sentence:

Response
{
  "error": "not_found",
  "message": "No diagram with that id in this workspace. List the workspace's diagrams to see the ids."
}
StatusCodeMeaning
400invalid_requestA parameter is missing or not one of the allowed values.
401unauthorizedNo key, or a key that is wrong, revoked or expired. The answer is the same in every case.
403forbiddenThe key does not have the scope the route needs.
404not_foundNothing with that id in the key's workspace. Ids in other workspaces look exactly like ids that do not exist.
409limitA plan limit was reached, for example saved versions per diagram.
429rate_limitedToo many requests. Wait for the number of seconds in the Retry-After header.

06Limits

  • 60 requests a minute and 1,000 an hour per key. 60 a minute per address on the library routes without a key.
  • A diagram response holds at most 300 components and 600 connections. When a list was cut the response has "truncated": true and a truncatedNote; counts always has the true totals.
  • Text fields are single-line and capped: names at 120 characters, descriptions at 400, walkthrough captions at 600.
  • The API is read-only apart from saving a version. There is no route to create, edit or delete a diagram.
  • Requests from a browser on another site are not allowed (no CORS). Call the API from a server or a script.