# Check a profile link is live

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

Check a profile link is live

## POST /api/validateLink

Full OpenAPI specification: https://docs.musicnerd.net/spec/artist-links.json

## Authentication

This operation's specification permits a request without authentication.

[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/validateLink": {
      "post": {
        "summary": "Check a profile link is live",
        "operationId": "postValidateLink",
        "security": [],
        "description": "Fetches a YouTube, SoundCloud, Bandcamp, Audius, Last.fm, OpenSea, Zora, Catalog, Supercollector or Mintsongs profile URL and says whether the page exists. A missing page, or a network failure, gives `valid: false` with a `reason`. No credentials.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "url": "https://soundcloud.com/peterango"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Checked. `reason` is present only when `valid` is false: `404 Not Found`, `soundcloud 404 redirect`, `<platform> error page` or `Network error or invalid URL`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "valid"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "valid": {
                      "type": "boolean"
                    },
                    "reason": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "status": "ok",
                  "valid": false,
                  "reason": "soundcloud error page"
                }
              }
            }
          },
          "400": {
            "description": "`url` is missing, not a string, or the body is not JSON (`No URL provided`), or no supported platform reads it (`Unsupported platform or invalid URL`). `valid` and `reason` are returned beside the error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "error",
                    "valid",
                    "reason"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "string"
                    },
                    "valid": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "reason": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "status": "error",
                  "error": "Unsupported platform or invalid URL",
                  "valid": false,
                  "reason": "Unsupported platform or invalid URL"
                }
              }
            }
          }
        }
      }
    }
  }
}
```
