ContextDx
Now available for free technical preview
Docs
Pricing
Blog
Boards
Getting StartedCore ConceptsPlatform FeaturesRole-Specific GuidesReference & ResourcesSelf-HostedSources

Reference & Resources

Integrations ReferenceOrganization SettingsBoards APIPermissions & Access Control
Reference & Resources
Integrations ReferenceOrganization SettingsBoards APIPermissions & Access Control
Reference & ResourcesBoards API

Last updated June 25, 2026

Boards API

The Boards API lets external plugins push structured architecture data — nodes, edges, and insights — directly to your workboards. It's how the ContextDX plugins (Cdx Code and Cdx Work), the VS Code extension, and custom integrations feed architecture into your boards.

Note

This is the API reference for building integrations. If you just want to use an existing plugin, see the ContextDX Plugins.

Base URL: https://<your-instance>/code-plugin (cloud default: https://api.contextdx.com/code-plugin)

Authentication

All plugin endpoints require two headers:

CODE
X-CodePlugin-Token: <binding-token>
X-CodePlugin-Secret: <api-secret>
HeaderFormatDescription
X-CodePlugin-TokenBase64url stringEncoded orgId:bindingId — identifies the workspace and binding
X-CodePlugin-Secretck_cp_live_* stringAPI secret generated when the Code Plugin source was created

Get credentials from the UI: Sources → your Code Plugin source → Binding → Copy Credentials.

Or programmatically:

CODE
GET /code-plugin/workspaces/:workspaceId/bindings/:bindingId/credentials

This requires a user session (not plugin headers).

Endpoints

Push Elements

Push nodes and edges to a workboard. Supports merge (upsert) or replace (clear then insert) modes.

CODE
POST /code-plugin/push
JSON
{
  "boardSlug": "system-overview",
  "mode": "merge",
  "nodes": [
    {
      "slug": "api-gateway",
      "name": "API Gateway",
      "description": "Main entry point for all client requests",
      "primitiveType": "node",
      "archetypeName": "System",
      "parentNodeSlug": null,
      "tags": ["backend", "critical-path"]
    },
    {
      "slug": "user-service",
      "name": "User Service",
      "description": "Handles authentication and user profiles",
      "primitiveType": "node",
      "archetypeName": "System",
      "parentNodeSlug": null,
      "tags": ["backend"]
    }
  ],
  "edges": [
    {
      "sourceSlug": "api-gateway",
      "targetSlug": "user-service",
      "relation": "calls",
      "detailedDescription": "REST API calls for auth and user lookup"
    }
  ]
}

Node fields:

FieldTypeRequiredDescription
slugstringYesUnique identifier within the board (1-200 chars)
namestringYesDisplay name (2-100 chars)
descriptionstringNoBrief description (max 500 chars)
primitiveTypeenumYesnode, container, region, axis, callout, leader_annotation, text
archetypeNamestringNoElement archetype (e.g., "System", "Container", "Component")
parentNodeSlugstringNoParent node for hierarchy
layerBoardSlugstringNoChild board for drill-down
tagsstring[]NoContext tags for categorization

Edge fields:

FieldTypeRequiredDescription
sourceSlugstringYesSource node slug
targetSlugstringYesTarget node slug
relationstringNoRelationship type (e.g., "calls", "depends-on")
archetypeNamestringNoEdge archetype name
tagsstring[]NoContext tags

Get Archetypes

Retrieve available element archetypes so your plugin uses valid archetypeName values.

CODE
GET /code-plugin/archetypes
JSON
{
  "archetypes": [
    {
      "name": "System",
      "description": "A software system or service",
      "visualPrimitiveType": "node",
      "canContain": ["Container", "Component"]
    }
  ]
}

Get Elements

Retrieve current nodes and edges from a board — useful for incremental updates.

CODE
GET /code-plugin/elements?boardSlug=system-overview

List Boards

Discover all boards in the workspace (parent and child).

CODE
GET /code-plugin/boards
JSON
{
  "boards": [
    {
      "boardSlug": "system-overview",
      "boardName": "System Overview",
      "isChildBoard": false,
      "parentBoardSlug": null,
      "parentNodeSlug": null
    }
  ]
}

Create Child Boards

Create layer boards for drill-down navigation. Idempotent — existing boards are skipped.

CODE
POST /code-plugin/boards
JSON
{
  "boards": [
    {
      "boardSlug": "api-gateway-internals",
      "boardName": "API Gateway Internals",
      "parentBoardSlug": "system-overview",
      "parentNodeSlug": "api-gateway"
    }
  ]
}

Get Insight Skills

List available insight templates (lightweight — no instructions or references).

CODE
GET /code-plugin/insight-skills

Get full template with instructions for execution:

CODE
GET /code-plugin/insight-skills/:slug

Push Insights

Push analysis results from a plugin to a board.

CODE
POST /code-plugin/insights
JSON
{
  "boardSlug": "system-overview",
  "rootBoardSlug": "root",
  "insightSkillSlug": "security-analysis",
  "title": "Security Analysis - April 2026",
  "insights": {
    "elementInsights": [
      {
        "elementSlug": "api-gateway",
        "signal": "risk",
        "priority": "high",
        "title": "No rate limiting configured",
        "description": "API Gateway has no rate limiting, vulnerable to DDoS"
      }
    ],
    "affectedElements": [],
    "paths": [],
    "graphSuggestions": []
  },
  "content": "## Security Analysis\n\nFull markdown report..."
}

Error Codes

Common error responses
StatusCodeCauseFix
400Branch mismatchPush branch doesn't match binding configUse the branch configured in the binding
400Invalid source typeSource isn't board_builderCreate a board_builder source, not a regular one
400Invalid token formatX-CodePlugin-Token isn't valid base64urlRe-copy the token from the Credentials panel
401Invalid API secretX-CodePlugin-Secret doesn't matchRegenerate the secret from the source settings
404Binding not foundToken references a deleted or non-existent bindingRe-create the source binding
404Board not foundboardSlug doesn't match any boardCheck available boards via GET /boards
404Template not foundinsightSkillSlug doesn't matchCheck available skills via GET /insight-skills

Integration Checklist

Verify your integration end-to-end:

  • board_builder source created in the workspace Sources catalog
  • Source is bound to a target board with the correct branch
  • Credentials copied (X-CodePlugin-Token + X-CodePlugin-Secret)
  • GET /archetypes returns valid archetype list
  • POST /push with a test node returns success: true
  • Node appears on the board in the UI
  • GET /elements?boardSlug=... returns the pushed node
Warning

Never hardcode credentials. Store X-CodePlugin-Token and X-CodePlugin-Secret in environment variables or a config file that's gitignored.

What's Next

Connecting Sources

Understand how Code Plugin sources fit into the broader source model.

Insight Skills

Learn about the insight templates your plugin can push results for.

ContextDX Plugins

See a working Code Plugin integration in action.

Permissions & Access

Understand who can see and edit the data your plugin pushes.

PreviousOrganization SettingsNextPermissions & Access Control

On this page

Boards APIAuthenticationEndpointsPush ElementsGet ArchetypesGet ElementsList BoardsCreate Child BoardsGet Insight SkillsPush InsightsError CodesIntegration ChecklistWhat's Next