Modify an active interview plan (preview→bind)
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):
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):
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_…" },
}),
});
Request
- Base URL: https://api.yardstick.team
- URL: https://api.yardstick.team/v1/interview_plans/actions/modify_active
- Auth: HTTP bearer
Headers
Required for this operation. Reuse the same key to safely retry the same request.
Optional caller-supplied request identifier. Values must match ^[A-Za-z0-9_-]{1,128}$; a valid value is echoed in the response X-Request-Id header, otherwise the API generates one.
Request body
Response
Bind succeeded — active plan modified.
Changes
No recorded changes to this operation across all 1 revision of this API.