# Save the About for a report

Source: https://docs.musicnerd.net/api-reference/admin/save-correction-about

Save the About for a report

## PUT /api/admin/bio-corrections/{id}/about

Full OpenAPI specification: https://docs.musicnerd.net/spec/admin.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: admin",
    "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/admin/bio-corrections/{id}/about": {
      "put": {
        "summary": "Save the About for a report",
        "operationId": "saveCorrectionAbout",
        "security": [
          {
            "adminBearer": []
          }
        ],
        "description": "Replaces the artist's published About and resolves the report in one step, keeping the old text in the artist's bio history and recording an `about_edited` activity. `revision` must match what [Read the About for a report](/api-reference/admin/get-correction-about) returned; if the About or the artist's ownership changed since, nothing is saved and the response is 409.",
        "parameters": [
          {
            "$ref": "#/components/parameters/reportId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "bio",
                  "revision"
                ],
                "properties": {
                  "bio": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000,
                    "description": "The new About. Trimmed; up to 10,000 characters."
                  },
                  "revision": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$",
                    "description": "The `revision` from the read."
                  }
                }
              },
              "example": {
                "bio": "Bio Ritmo is a 10-piece salsa orchestra from Richmond, Virginia, formed in 1991.",
                "revision": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The About is saved and the report resolved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                },
                "example": {
                  "status": "ok",
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "`id` isn't a UUID, or the body isn't a non-empty `bio` of up to 10,000 characters with a 64-hex-character `revision`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "id": {
                    "value": {
                      "status": "error",
                      "error": "Invalid report ID"
                    }
                  },
                  "body": {
                    "value": {
                      "status": "error",
                      "error": "Enter a valid About and reload the editor if needed."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/NotSignedIn"
          },
          "403": {
            "$ref": "#/components/responses/NotAdmin"
          },
          "409": {
            "description": "The save was refused: the revision no longer matches, the report was reviewed meanwhile, the About is pinned, or the published About is no longer available, or the new text isn't a real About. The draft is not saved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": "error",
                  "error": "The About or artist ownership changed. Your draft is kept; cancel and reopen the editor to review the latest version."
                }
              }
            }
          },
          "500": {
            "description": "The save could not be confirmed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": "error",
                  "error": "Could not confirm the save. Your draft is kept; refresh the queue before retrying."
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "reportId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The correction report's ID (a UUID).",
        "schema": {
          "type": "string",
          "format": "uuid"
        },
        "example": "e7a5f235-4e66-40ba-9ff6-7276339fe34f"
      }
    },
    "schemas": {
      "Success": {
        "type": "object",
        "required": [
          "status",
          "success"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ok"
            ]
          },
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "status",
          "error"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "error"
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    },
    "responses": {
      "NotSignedIn": {
        "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"
            }
          }
        }
      },
      "NotAdmin": {
        "description": "The user is not an admin.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "status": "error",
              "error": "Forbidden"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "adminBearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Access token",
        "description": "A Music Nerd admin's access token. Copy it at https://musicnerd.net/access after signing in. A signed-in user who is not an admin gets 403."
      }
    }
  }
}
```
