# Reset the claim build

Source: https://docs.musicnerd.net/api-reference/onboarding/reset

Reset the claim build

## POST /api/onboarding/{artistId}/reset

Full OpenAPI specification: https://docs.musicnerd.net/spec/onboarding.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: onboarding",
    "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/onboarding/{artistId}/reset": {
      "post": {
        "summary": "Reset the claim build",
        "operationId": "resetClaimBuild",
        "security": [
          {
            "privyBearer": []
          }
        ],
        "description": "Removes everything the claim build wrote and returns the removed values as the backup. Afterwards the state endpoint reports `currentStep: \"profiles\"`, and visiting the artist page starts a fresh build. The artist's own edits, uploads and interview answers stay. Spotify and Deezer identities and their mappings are preserved. Use the authenticated profile editor to disconnect a catalog identity; build reset is not identity removal.",
        "parameters": [
          {
            "name": "artistId",
            "in": "path",
            "required": true,
            "description": "The artist's ID (a UUID).",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "aab92f80-f9e1-4299-aa33-7dd85c8de5d3"
          }
        ],
        "responses": {
          "200": {
            "description": "The removed values, as a backup.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClaimBuildReset"
                },
                "examples": {
                  "withData": {
                    "summary": "A built artist (Bio Ritmo on staging)",
                    "value": {
                      "status": "ok",
                      "removed": {
                        "steps": [
                          "profiles",
                          "vault",
                          "interview",
                          "publish"
                        ],
                        "links": {
                          "instagram": "bioritmomusic"
                        },
                        "bio": "Bio Ritmo is a 10-piece salsa band from Richmond, Virginia.",
                        "doc": true,
                        "sources": 30,
                        "jobs": 1
                      }
                    }
                  },
                  "empty": {
                    "summary": "An artist with nothing to reset",
                    "value": {
                      "status": "ok",
                      "removed": {
                        "steps": [],
                        "links": {},
                        "bio": null,
                        "doc": false,
                        "sources": 0,
                        "jobs": 0
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "`artistId` isn't a UUID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": "error",
                  "error": "artistId must be a UUID"
                }
              }
            }
          },
          "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. The server research key is also refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": "error",
                  "error": "Not your artist"
                }
              }
            }
          },
          "404": {
            "description": "No artist with that ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": "error",
                  "error": "Artist not found"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ClaimBuildReset": {
        "type": "object",
        "required": [
          "status",
          "removed"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ok"
            ]
          },
          "removed": {
            "type": "object",
            "required": [
              "steps",
              "links",
              "bio",
              "doc",
              "sources",
              "jobs"
            ],
            "properties": {
              "steps": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "The step names that were confirmed, now deleted."
              },
              "links": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                },
                "description": "The link columns that had values, now null. Keys are column names; values are the old handles or IDs."
              },
              "bio": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The bio text that was removed, or null if there was none."
              },
              "doc": {
                "type": "boolean",
                "description": "Whether a Lore document was deleted."
              },
              "sources": {
                "type": "integer",
                "description": "How many research vault sources were deleted."
              },
              "jobs": {
                "type": "integer",
                "description": "How many pending or running research jobs were deleted."
              }
            }
          }
        }
      },
      "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. The user must be the artist's approved claimant or a Music Nerd admin."
      }
    }
  }
}
```
