> For the complete documentation index, see [llms.txt](https://docs.teranode.group/nchain-event/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.teranode.group/nchain-event/linked-records/api-workflow/verify-link-record-+.md).

# Verify Link Record § †

<figure><img src="/files/YQdxbFdjZuUn7NNFjjIn" alt="" width="563"><figcaption></figcaption></figure>

1. Anyone with the original record and information can check whether the record exists at the location
2. Any type of link record (create, update and delete) can be verified
3. The result indicates whether there is a match, a mismatch, or unknown (retry later)

## **Verify Encoded Link**

To verify the original record, the verifier will need any previous link location, the record, encoder, salt and the expected location.

#### Example code:

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X POST "$URL/api/v1/linkedrecords/$LOC/match?prevTxId=$LOC1&encode=SHA256(01-02T13.14.15)|Base64" \
     -H "x-api-key: $KEY" \
     -H "accept: text/plain" \
     -H "Content-Type: application/octet-stream" \
     --data-binary "hello"
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const response = await fetch('${url}/api/v1/linkedrecords/${loc1}/match?prevTxId=${loc}&encode=SHA256(01-02T13.14.15)|Base64', {
  method: 'POST',
  headers: {
    'x-api-key': '${key}',
    'accept': 'text/plain',
    'Content-Type': 'application/octet-stream'
  },
  body: 'hello'
});
```

{% endtab %}
{% endtabs %}

## **Verify Unencoded Link** ‡

To verify the original record, the verifier will need any previous link location, the record and the expected location.

#### **Example** **code:**

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X POST "$URL/api/v1/linkedrecords/$LOC/match?prevTxId=$LOC1" \
     -H "x-api-key: $KEY" \
     -H "accept: text/plain" \
     -H "Content-Type: application/octet-stream" \
     --data-binary "hello"
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const response = await fetch('${url}/api/v1/linkedrecords/${loc1}/match?prevTxId=${loc}', {
  method: 'POST',
  headers: {
    'x-api-key': '${key}',
    'accept': 'text/plain',
    'Content-Type': 'application/octet-stream'
  },
  body: 'hello'
});
```

{% endtab %}
{% endtabs %}

## **Example Responses**

#### Example cURL matching response:

```json
{
  "match": true,
  ....
}
```

#### Example cURL mismatching response:

```json
{
  "match": false,
  ....
}
```

#### Example cURL unknown response:

```json
{
  "title": "Content not found",
  "status": 404,
  ....
}
```
