# Review a link suggestion

Source: https://docs.musicnerd.net/api-reference/artist-links/review-link-suggestion

Review a link suggestion

## POST /api/artist/{id}/link-suggestions

Full OpenAPI specification: https://docs.musicnerd.net/spec/artist-links.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 links",
    "version": "1.0.0",
    "description": "Writing, ordering, checking and reviewing the platform links on an artist's profile."
  },
  "servers": [
    {
      "url": "https://musicnerd-api.vercel.app",
      "description": "Production"
    },
    {
      "url": "https://musicnerd-api-staging.vercel.app",
      "description": "Staging (staging database)"
    }
  ],
  "paths": {
    "/api/artist/{id}/link-suggestions": {
      "post": {
        "summary": "Review a link suggestion",
        "operationId": "postArtistLinkSuggestionReview",
        "security": [
          {
            "privyBearer": []
          }
        ],
        "description": "Approves, dismisses, removes or restores one suggestion, as the approved claimant or an admin. Approving a link writes it to the profile (an Apple Music or Beatport page becomes an approved Lore source), and approving a source also queues its text extraction; `remove` hides an approved source's icon and `restore` shows it again, both keeping it in Lore. Every decision is recorded in the artist's activity.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The artist's id (a UUID).",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "6cb3d81a-3d02-4c57-a711-bb7902a9af1b"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "kind",
                  "decision"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The suggestion's id, from the list."
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "ugc",
                      "source"
                    ]
                  },
                  "decision": {
                    "type": "string",
                    "enum": [
                      "approve",
                      "dismiss",
                      "remove",
                      "restore"
                    ],
                    "description": "`remove` and `restore` apply only to an approved source."
                  }
                }
              },
              "example": {
                "id": "0f3a7c62-1d7e-4b1e-9a7a-5b1f0c0e2a11",
                "kind": "ugc",
                "decision": "approve"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Reviewed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                },
                "example": {
                  "status": "ok",
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "`id` is not a UUID or the body is not a valid decision.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": "error",
                  "error": "Invalid review request"
                }
              }
            }
          },
          "401": {
            "description": "No valid access token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": "error",
                  "error": "Not signed in"
                }
              }
            }
          },
          "403": {
            "description": "The user is not the artist's approved claimant or an admin, or the claim changed during the review.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": "error",
                  "error": "Not authorized for this artist"
                }
              }
            }
          },
          "409": {
            "description": "The suggestion cannot be reviewed as asked: it is gone (`This suggestion is no longer available. Refresh the profile.`), already reviewed (`This suggestion has already been reviewed. Refresh the profile.`), not a profile link (`This is not an artist profile link. Review it in Lore.`), only approved sources can be removed or restored, the URL already exists in Lore (`This URL already exists in Lore. Review that source instead.`), or a different account is already connected on that platform (`A different account is already connected. Remove the existing link before approving this replacement.`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": "error",
                  "error": "This suggestion has already been reviewed. Refresh the profile."
                }
              }
            }
          },
          "500": {
            "description": "The review could not be saved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": "error",
                  "error": "Could not review this link"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "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"
          }
        }
      }
    },
    "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. Link writes need the artist's approved claimant or a Music Nerd admin; `removeArtistData` accepts any whitelisted user too."
      }
    }
  }
}
```
