# Correct a claim in the Lore

Source: https://docs.musicnerd.net/api-reference/artist-bio/knowledge-doc-correction

Correct a claim in the Lore

## POST /api/artist/{id}/knowledge-doc/corrections

Full OpenAPI specification: https://docs.musicnerd.net/spec/artist-bio.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://docs.musicnerd.net/authentication)

## Operation and referenced schemas

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Music Nerd API: artist bio",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://musicnerd-api.vercel.app",
      "description": "Production"
    },
    {
      "url": "https://musicnerd-api-staging.vercel.app",
      "description": "Staging (staging database)"
    }
  ],
  "paths": {
    "/api/artist/{id}/knowledge-doc/corrections": {
      "post": {
        "summary": "Correct a claim in the Lore",
        "operationId": "postKnowledgeDocCorrection",
        "security": [
          {
            "privyBearer": []
          }
        ],
        "description": "Marks one claim in the artist's Lore as wrong, or replaces it with the artist's own wording, then queues the Lore to rebuild. The correction is kept beside the document and applied on every rebuild; correcting the same claim again replaces the earlier correction. Only the artist's approved claimant or an admin may correct it.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The artist's ID (a UUID).",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "aab92f80-f9e1-4299-aa33-7dd85c8de5d3"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "claim",
                  "kind"
                ],
                "properties": {
                  "claim": {
                    "type": "string",
                    "description": "The claim as the document states it, without citation markers. Trimmed; the first 1,000 characters are kept."
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "wrong",
                      "fix"
                    ],
                    "description": "`wrong`: not true or not about this artist. `fix`: replace it with `correction`."
                  },
                  "correction": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The artist's wording. Required for `fix`, ignored for `wrong`. Trimmed; the first 2,000 characters are kept."
                  }
                }
              },
              "examples": {
                "wrong": {
                  "summary": "Not true",
                  "value": {
                    "claim": "Bio Ritmo toured Japan in 2004.",
                    "kind": "wrong"
                  }
                },
                "fix": {
                  "summary": "In the artist's words",
                  "value": {
                    "claim": "Bio Ritmo is a salsa band from Richmond, Virginia, formed in 1991.",
                    "kind": "fix",
                    "correction": "Bio Ritmo is a salsa band from Richmond, Virginia, formed in 1985."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Saved. The Lore rebuild is queued.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                },
                "example": {
                  "status": "ok"
                }
              }
            }
          },
          "400": {
            "description": "`id` isn't a UUID, the body isn't valid, `claim` is blank, or `kind` is `fix` with no `correction`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "noClaim": {
                    "summary": "No claim",
                    "value": {
                      "status": "error",
                      "error": "No claim given"
                    }
                  },
                  "noFix": {
                    "summary": "A fix with no wording",
                    "value": {
                      "status": "error",
                      "error": "Write your correction first"
                    }
                  },
                  "invalid": {
                    "summary": "Bad body",
                    "value": {
                      "status": "error",
                      "error": "Invalid correction"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "No token, an invalid or expired token, or no Music Nerd user for it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": "error",
                  "error": "Not signed in"
                }
              }
            }
          },
          "403": {
            "description": "The user is neither the artist's claimant nor an admin, or the artist's claim changed during the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": "error",
                  "error": "Not your artist"
                }
              }
            }
          },
          "500": {
            "description": "The write failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": "error",
                  "error": "Failed to save your correction"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Ok": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ok"
            ]
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "status",
          "error"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "error"
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "privyBearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Access token",
        "description": "The signed-in user's access token. Copy it at https://musicnerd.net/access after signing in. Each operation says who may call it: any signed-in user, or the artist's approved claimant or a Music Nerd admin."
      }
    }
  }
}
```
