Changes

Apply a change permitted by saved policy

Apply your saved plan using current EHQ permissions, conflict checks and autonomy policy. Requires the separate opt-in changes:apply scope. This cannot claim human approval: live changes, sends, access changes and other plans outside unattended policy return APPROVAL_REQUIRED with a review link. Reuse the same idempotencyKey on retry, then inspect and read back the saved result.

Method

POST

Path

/v1/changes/apply

Required scope

changes:apply

Request

curl -X POST "https://api.endurancehq.app/v1/changes/apply" \
  -H "Authorization: Bearer $EHQ_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

JSON body schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "planId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "idempotencyKey": {
      "type": "string",
      "minLength": 8,
      "maxLength": 255
    }
  },
  "required": [
    "planId",
    "idempotencyKey"
  ],
  "additionalProperties": false
}

Response

Success status: 200

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

Other surfaces

CLI: ehq changes apply <plan_id> --idempotency-key <key>

MCP tool: ehq_changes_apply