---
title: "Modify an active interview plan (preview→bind)"
method: POST
path: "/v1/interview_plans/actions/modify_active"
tags: ["Interview Plan Builder"]
---

# Modify an active interview plan (preview→bind)

`POST /v1/interview_plans/actions/modify_active`

## Request

- Base URL: `https://api.yardstick.team`
- URL: `https://api.yardstick.team/v1/interview_plans/actions/modify_active`
- Auth: HTTP bearer

Modify an active interview plan (preview→bind)

**Required scopes:** `interview_plans:write`, `interview_plans:modify_active`

Preview→bind flow. Calling without a `binding` returns HTTP 202 with the approval-required envelope (no mutation), including the active plan's affected application and session counts and a redacted per-round reassignment plan. The 200 response shape documented here is returned only on the bind call, which applies the content the preview showed: it writes the plan columns the draft addressed — title, role name, additional info, location, location type, outcomes, competencies, job skills, behavioral anchors and the interview sequence — mints a new active `interview_versions` row per changed round, repoints `not_started` sessions to the new content, and keeps `in_progress`/`completed` sessions pinned to the prior content. A section the draft never addressed is left exactly as it is on the live plan. To execute, re-issue with `binding` echoing the preview's `preview_hash`, `approved_action_key`, `approved_input_hash`, `approved_idempotency_key`, and `resource_version_precondition`. The key captured in `approval.binding.approved_idempotency_key` must match on the bind request. The `resource_version_precondition` keys off the active plan's `updated_at`; a concurrent active-plan edit between preview and bind returns 409 `precondition_failed`.

**Applying an emptied section.** A draft stage emptied with `clear_*` is applied here like any other change: the live plan's matching section is emptied too. This is the only way an emptied section reaches a live plan — a cleared draft cannot be published as a new plan, because draft validation still requires items. A section the draft never touched is still never written: emptying reaches the live plan only when the draft carries an explicit `clear_*` marker for that stage, which is what distinguishes a deliberate emptying from a section the editor simply left alone.

**Example (curl):**

```bash
curl -X POST https://api.yardstick.team/v1/interview_plans/actions/modify_active \
  -H 'Authorization: Bearer ys_sk_live_…' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: 7c3a…' \
  -d '{"action":"interview_plan.modify_active","input":{"draft_id":"ipd_…","active_plan_id":"plan_…"}}'
```

**Example (TypeScript):**

```ts
await fetch("https://api.yardstick.team/v1/interview_plans/actions/modify_active", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.YS_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    action: "interview_plan.modify_active",
    input: { draft_id: "ipd_…", active_plan_id: "plan_…" },
  }),
});
```

## Headers

- `Idempotency-Key` string, required
- `X-Request-Id` string

## Request body

- object
  - `action` 'interview_plan.modify_active', required
  - `resource` object
    - `type` 'interview_plan', required
    - `id` string
  - `input` object, required
    - `draft_id` string
    - `active_plan_id` string
    - `expected_draft_version` integer
    - `expected_plan_version` integer
    - `approval_id` string

## Response `200`

Bind succeeded — active plan modified.

- ModifyActiveResult: Bind-path 200 for `interview_plan.modify_active`: the versioning + per-status session reassignment outcome. Returned only on the bind call; the preview (202) returns the shared approval-required envelope.
  - `object` 'interview_plan_modify_active_result', required
  - `action` 'interview_plan.modify_active', required
  - `resource` object, required
    - `type` 'interview_plan', required
    - `id` string, required: Public `plan_…` id echoed from the request.
  - `mutated` boolean, required: Whether the bind actually wrote anything. False when every addressed content column already matched the active plan and the round diff was empty; the bind is still recorded, but no version was minted and no session moved.
  - `rounds` object[], required: Per round the edit added, changed or removed: the versioning + reassignment outcome.
    - `round_id` string, required
    - `new_version_id` string, nullable, required: Id of the newly minted active version for this round, or null for a removed round (removal deactivates versions and mints nothing).
    - `old_version_id` string, nullable, required: Id of the snapshot version locked sessions were pinned to, or null when no locked sessions existed.
    - `not_started_repointed` integer, required: Count of not_started sessions repointed to the new version.
    - `locked_pinned` integer, required: Count of in_progress/completed sessions pinned to the prior content.
    - `change_kind` 'added' | 'removed': Present only on a round the edit added or removed; a changed round carries neither this key nor versions_deactivated.
    - `versions_deactivated` integer: Present only on a removed round: how many of its versions were deactivated.
  - `sessions_repointed` integer, required: Total not_started sessions repointed across all changed rounds.
  - `locked_pinned` integer, required: Total locked sessions kept pinned across all changed rounds.
  - `affected_counts` object, required: Mode-scoped affected application and session counts.

## Other responses

- `400`: Invalid request
- `401`: Authentication failure
- `403`: Permission denied (scope or feature flag)
- `404`: Resource not found. The error uses the resource-specific code and param names the exact body field or path parameter that referenced it.
- `409`: Conflict (e.g. idempotency key reuse with different body)
- `429`: Rate limited
- `500`: Internal error

---

[API](https://skmtc.dev/yardstick/apis/yardstick-public-api.md) · [All operations](https://skmtc.dev/yardstick/apis/yardstick-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/yardstick/apis/yardstick-public-api/revisions/bef1d2eaaaa1?raw)
