# Revise a saved response

Source: https://musicnerd-docs.vercel.app/api-reference/interview-responses/revise

Revise a saved interview response

## PATCH /api/artist/{id}/interview/responses/{answerId}

Full OpenAPI specification: https://musicnerd-docs.vercel.app/spec/interview-responses.json

## Authentication

This operation requires one of the security alternatives in the specification below. Security scheme definitions are included where present in the published specification.

[Authentication guide](https://musicnerd-docs.vercel.app/authentication)

## Operation and referenced schemas

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Music Nerd interview response revisions",
    "version": "1.0.0",
    "description": "Private artist interview review and exact response revisions. Separate from starting or generating interviews."
  },
  "servers": [
    {
      "url": "https://musicnerd-api.vercel.app",
      "description": "Production API; these new routes are not released yet."
    }
  ],
  "paths": {
    "/api/artist/{id}/interview/responses/{answerId}": {
      "patch": {
        "operationId": "reviseInterviewResponse",
        "summary": "Revise a saved interview response",
        "description": "The authenticated current claimant/admin edits an answered question. expectedRevision rejects stale overwrites. Exact question, sitting and offeredAt are immutable. Earlier wording is retained, current knowledge history reads the new answer, and the edit is audited. A byte-identical answer is a no-op. note describes the edit and is not artist evidence. Edits do not automatically publish a new bio. No blank/delete/skip conversion. The edit, version archive, activity attribution and Lore refresh queue entry commit atomically; a queue failure rolls the edit back. Older generated Lore may remain visible until the queued refresh completes. Request bodies are bounded to 20,000 bytes.",
        "security": [
          {
            "privyBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Artist ID in the selected environment."
          },
          {
            "name": "answerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized result; Cache-Control: private, no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseRead"
                }
              }
            }
          },
          "400": {
            "description": "Invalid ID, unexpected field or invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid Privy access token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Current approved claimant or administrator required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Response or requested revision unavailable for this artist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Response changed or pagination is stale. Reload before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request or stored record exceeds the supported size; nothing is silently truncated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Storage unavailable; this is not an empty history.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RevisionInput"
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ResponseRead": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ok"
            ]
          },
          "response": {
            "$ref": "#/components/schemas/Response"
          },
          "isCurrent": {
            "type": "boolean"
          }
        },
        "required": [
          "status",
          "response",
          "isCurrent"
        ]
      },
      "Error": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "error"
            ]
          },
          "error": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "error",
          "code"
        ]
      },
      "RevisionInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "expectedRevision": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "example": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
          },
          "answer": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "note": {
            "type": "string",
            "maxLength": 400
          }
        },
        "required": [
          "expectedRevision",
          "answer"
        ]
      },
      "Response": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "questionKey": {
            "type": "string"
          },
          "question": {
            "type": "string"
          },
          "answer": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "sitting": {
            "type": [
              "integer",
              "null"
            ]
          },
          "offeredAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "answerUpdatedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "revision": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "example": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
          }
        },
        "required": [
          "id",
          "questionKey",
          "question",
          "answer",
          "source",
          "sitting",
          "offeredAt",
          "answerUpdatedAt",
          "revision"
        ]
      }
    },
    "securitySchemes": {
      "privyBearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Privy access token"
      }
    }
  }
}
```
