Velacent Bridge: beta December 2026, general availability early 2027. E-mail sales to request beta access.

Documentation menu

Config code API

Last updated . Documentation for the current release. Ask in the product.

2 operations. Back to the API overview. Examples use synthetic data.

Applies configuration files the caller reviewed as a plan

POST /admin/v1/config/apply

Applies configuration files the caller reviewed as a plan: the plan is computed again and must have the same plan_sha256; every change needs the same permission as the console edit of its kind; all changes are written in one transaction with the stated reason, audited fail-closed (one admin audit record and the stdout record before commit), each a new version in the configuration history. A further permission depends on the resource (for configuration, the write permission of its kind: config:write, or senders:write for senders).

Needs the permission: config:history.

Request body

Request body of Applies configuration files the caller reviewed as a plan
FieldTypePresenceDescription
entitiesarray of object (ConfigcodeEntity)optional-
entities.[]documentanyoptional-
entities.[]idstringoptional-
entities.[]kindstringoptional-
kindsarray of stringoptionalKinds limits the plan (and pruning) to these kinds; every desired entity must be of one of them. Empty: every kind.
plan_sha256stringoptional-
prunebooleanoptionalPrune deletes live entities of the managed, writable kinds that the files do not hold. Read-only kinds are never deleted.
reasonstringoptional-
Example request body (synthetic data)
{
  "entities": [
    {
      "document": {},
      "id": "example-id",
      "kind": "example"
    }
  ],
  "kinds": [
    "example"
  ],
  "plan_sha256": "example",
  "prune": true,
  "reason": "Example text"
}

Response 200

Response fields of Applies configuration files the caller reviewed as a plan
FieldTypePresenceDescription
config_versionanyoptional-
planobject (ConfigcodePlan)optionalPlan is the result of comparing desired entities with the live configuration.
plan.changesarray of object (ConfigcodeChange)optional-
plan.config_versionintegeroptional-
plan.plan_sha256stringoptional-
plan.summarymap of integeroptional-
plan.unmanagedintegeroptionalUnmanaged counts live entities in scope that the files do not hold and that are kept (no prune, or a read-only kind).
plan.validation_errorstringoptionalValidationError is the configuration validation's verdict on the result (empty: valid). An apply runs the same validation again.
statusstringoptional-
Example response (synthetic data)
{
  "config_version": {},
  "plan": {
    "changes": [
      {
        "action": "example",
        "document_sha256": "example",
        "from_version": 1,
        "id": "example-id",
        "kind": "example",
        "note": "example",
        "paths": [
          "example"
        ],
        "permission": "example",
        "permitted": true
      }
    ],
    "config_version": 1,
    "plan_sha256": "example",
    "summary": {
      "example": 1
    },
    "unmanaged": 1,
    "validation_error": "Example text"
  },
  "status": "ok"
}

Other responses

  • 401 Authentication required
  • 403 Not permitted
  • 404 Not Found
  • 503 Unavailable (nothing was changed)
Example request
curl --request POST \
  --header "Authorization: Bearer $ID_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{"entities":[{"document":{},"id":"example-id","kind":"example"}],"kinds":["example"],"plan_sha256":"example","prune":true,"reason":"Example text"}' \
  "https://YOUR-CONSOLE-HOST/admin/v1/config/apply"

Previews applying configuration files

POST /admin/v1/config/plan

Previews applying configuration files: what would be created, updated or deleted, the paths that differ, the permission each change needs, and the configuration validation's verdict. Nothing is written. Operator and above (config:history).

Needs the permission: config:history.

Request body

Request body of Previews applying configuration files
FieldTypePresenceDescription
entitiesarray of object (ConfigcodeEntity)optional-
entities.[]documentanyoptional-
entities.[]idstringoptional-
entities.[]kindstringoptional-
kindsarray of stringoptionalKinds limits the plan (and pruning) to these kinds; every desired entity must be of one of them. Empty: every kind.
prunebooleanoptionalPrune deletes live entities of the managed, writable kinds that the files do not hold. Read-only kinds are never deleted.
Example request body (synthetic data)
{
  "entities": [
    {
      "document": {},
      "id": "example-id",
      "kind": "example"
    }
  ],
  "kinds": [
    "example"
  ],
  "prune": true
}

Response 200

Response fields of Previews applying configuration files
FieldTypePresenceDescription
changesarray of object (ConfigcodeChange)optional-
changes.[]actionstringoptional-
changes.[]document_sha256stringoptionalDocumentSHA256 is the digest of the desired canonical document.
changes.[]from_versionintegeroptionalFromVersion is the live version the change replaces (0: none).
changes.[]idstringoptional-
changes.[]kindstringoptional-
changes.[]notestringoptional-
changes.[]pathsarray of stringoptionalPaths are the JSON paths that differ (at most MaxPaths).
changes.[]permissionstringoptionalPermission is what writing the entity requires; Permitted reports whether the caller holds it.
changes.[]permittedbooleanoptional-
config_versionintegeroptional-
plan_sha256stringoptional-
summarymap of integeroptional-
unmanagedintegeroptionalUnmanaged counts live entities in scope that the files do not hold and that are kept (no prune, or a read-only kind).
validation_errorstringoptionalValidationError is the configuration validation's verdict on the result (empty: valid). An apply runs the same validation again.
Example response (synthetic data)
{
  "changes": [
    {
      "action": "example",
      "document_sha256": "example",
      "from_version": 1,
      "id": "example-id",
      "kind": "example",
      "note": "example",
      "paths": [
        "example"
      ],
      "permission": "example",
      "permitted": true
    }
  ],
  "config_version": 1,
  "plan_sha256": "example",
  "summary": {
    "example": 1
  },
  "unmanaged": 1,
  "validation_error": "Example text"
}

Other responses

  • 401 Authentication required
  • 403 Not permitted
  • 404 Not Found
  • 503 Unavailable (nothing was changed)
Example request
curl --request POST \
  --header "Authorization: Bearer $ID_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{"entities":[{"document":{},"id":"example-id","kind":"example"}],"kinds":["example"],"prune":true}' \
  "https://YOUR-CONSOLE-HOST/admin/v1/config/plan"

Something unclear or missing? Ask Help in the Velacent Bridge console; answers link to the right screen. How support works.