---
title: "Edit the fields of a staged action proposal"
method: PATCH
path: "/api/copilot/threads/{threadId}/actions/{actionId}"
tags: ["Copilot"]
---

# Edit the fields of a staged action proposal

`PATCH /api/copilot/threads/{threadId}/actions/{actionId}`

## Request

- Base URL: `https://api.setluca.com`
- URL: `https://api.setluca.com/api/copilot/threads/{threadId}/actions/{actionId}`
- Auth: API key in cookie `luca.session_token`

The coach's edits to a proposal card. Send the revision you saw and only the fields that changed. The proposal gets a new revision, so an approval of the older one is refused. You'll get a 409 with `revision_conflict` when the revision is stale.

**Session-only.** This endpoint isn't on the API-key allowlist. An organization API key gets a 403 here, whatever scopes it holds.

## Path parameters

- `threadId` string, uuid, required
- `actionId` string, uuid, required

## Headers

- `Luca-API-Version` '1'

## Request body

- CopilotProposalAmendRequest
  - `revision` integer, required
  - `fields` object, required

## Response `200`

ok

- CopilotProposalAmendedResponse
  - `action` CopilotProposal, required
    - `id` string, uuid, required
    - `threadId` string, uuid, required
    - `operationId` string, nullable, required
    - `planKind` string, nullable, required
    - `revision` integer, required
    - `payload` object, required
      - `steps` object[]
        - `operationId` string, required
        - `input` unknown
      - `items` unknown[]
        - unknown
    - `payloadHash` string, nullable, required
    - `diff` object[], required
      - `label` string, required
      - `before` string
      - `after` string
      - `index` integer
    - `sideEffects` string[], required
    - `card` object, required
      - `title` string, required
      - `text` string, required
      - `warning` string
      - `fields` object[]
        - `name` string, required
        - `label` string, required
        - `kind` 'string' | 'text' | 'number' | 'enum' | 'list', required
        - `options` object[]
          - `value` string, required
          - `label` string, required
        - `value` unknown
    - `outcomes` object[], required
      - `index` integer, required
      - `status` string, required
      - `httpStatus` integer, nullable, required
      - `message` string, nullable, required
      - `resultRef` string, nullable, required
      - `result` unknown
      - `resultOmitted` 'too_large': Set when a step that spends AI credits succeeded but its answer was too large to keep. Absent otherwise.
    - `status` string, required
    - `expiresAt` string, required
    - `stuck` boolean, required: The run ended short, failed, or stopped showing progress, so the coach may retry or discard it.
    - `toolName` string, nullable, required

## Other responses

- `400`: bad request
- `401`: unauthorized
- `403`: forbidden
- `404`: not found
- `409`: conflict
- `410`: gone
- `429`: rate limited
- `500`: internal error
- `503`: service unavailable

---

[API](https://skmtc.dev/setluca/apis/luca-api.md) · [All operations](https://skmtc.dev/setluca/apis/luca-api/llms.txt) · [OpenAPI document](https://skmtc.dev/setluca/apis/luca-api/revisions/90a200e4100b?raw)
