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.
https://api.archreactor.appVersion: 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.
curl -s https://api.archreactor.app/v1/diagrams \
-H "Authorization: Bearer ar_live_YOUR_KEY"{
"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
| Route | Parameters | Needs | Returns |
|---|---|---|---|
GET /v1/library | q, limit | No key | Search the System Design Library. |
GET /v1/library/{slug} | none | No key | One library entry in full. |
GET /v1/diagrams | none | Key | The workspace's diagrams. |
GET /v1/diagrams/{id} | none | Key | Components and connections. |
GET /v1/diagrams/{id}/walkthrough | walkthroughId | Key | The walkthrough, step by step. |
GET /v1/diagrams/{id}/data-flow | minSensitivity | Key | Sensitive data and trust-boundary crossings. |
GET /v1/diagrams/{id}/sequence | format | Key | Mermaid or PlantUML source. |
GET /v1/diagrams/{id}/versions | none | Key | Saved versions and their reviews. |
GET /v1/diagrams/{id}/versions/compare | from, to | Key | What changed between two versions. |
POST /v1/diagrams/{id}/versions | label, note (JSON body) | Key with write | Save the diagram as a new version. |
GET /v1/components | q | Key | Find components across diagrams. |
Parameters
minSensitivity: the least sensitive data to include. One ofall,internal,personal(the default),credentials,financial,cardholder,health.format:mermaid(the default) orplantuml.from,to: version numbers as the versions route lists them (1, 2, 3).todefaults tocurrent, 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, fromotherWalkthroughsin the walkthrough response.
04Examples
What cardholder data crosses a trust boundary?
curl -s "https://api.archreactor.app/v1/diagrams/DIAGRAM_ID/data-flow?minSensitivity=cardholder" \
-H "Authorization: Bearer ar_live_YOUR_KEY"{
"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)
curl -s "https://api.archreactor.app/v1/library?q=chat"Save a version (needs the write scope)
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:
{
"error": "not_found",
"message": "No diagram with that id in this workspace. List the workspace's diagrams to see the ids."
}| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | A parameter is missing or not one of the allowed values. |
| 401 | unauthorized | No key, or a key that is wrong, revoked or expired. The answer is the same in every case. |
| 403 | forbidden | The key does not have the scope the route needs. |
| 404 | not_found | Nothing with that id in the key's workspace. Ids in other workspaces look exactly like ids that do not exist. |
| 409 | limit | A plan limit was reached, for example saved versions per diagram. |
| 429 | rate_limited | Too 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": trueand atruncatedNote;countsalways 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.