# deleteRecord

Deletes the record of a second-level domain or its subdomains with specific type.

***

### Parameters

| Name | Type    | Description                                                                                                                         | Required |
| ---- | ------- | ----------------------------------------------------------------------------------------------------------------------------------- | -------- |
| name | String  | The second-level domain name, "test.neo"                                                                                            | Required |
| type | Integer | <p>Available types are:<br>1 - IPV4 address record<br>5 - Canonical name record<br>16 - Text record<br>28 - IPV6 address record</p> |          |

### Example

Request body #1

```json5
curl --request POST \
  --url http://localhost:20332/ \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "method": "invokefunction",
  "params": [ "0x538355b776538a5da0b2a08c139b9900b9c0cbb6", "deleteRecord",
                         [
                             {
                                 "type":"String","value":"sub1.flamincome.neo"
                             },{"type":"Integer","value":"1"}
                         ],
    [
      {
        "account": "NV1butKWMZSpWhBGU7PyP5Qe81Wq3zDkHP",
        "scopes": "CalledByEntry"
      }
    ]
],
  "id": 1
}
'
```

Response body #1

```json5
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "script": "EQwTc3ViMS5mbGFtaW5jb21lLm5lbxLAHwwMZGVsZXRlUmVjb3JkDBS2y8C5AJmbE4ygsqBdilN2t1WDU0FifVtS",
        "state": "HALT",
        "gasconsumed": "1611960",
        "exception": null,
        "stack": [
            {
                "type": "Any"
            }
        ]
    }
}
```

Request body #2

Deletes all records of the expired domain:

```json5
curl --request POST \
  --url http://localhost:20332/ \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "method": "invokefunction",
  "params": [ "0x538355b776538a5da0b2a08c139b9900b9c0cbb6", "deleteRecord",
                         [
                             {
                                 "type":"String","value":"expired.neo"
                             },{"type":"Integer","value":"1"}
                         ],
    [
      {
        "account": "NV1butKWMZSpWhBGU7PyP5Qe81Wq3zDkHP",
        "scopes": "CalledByEntry"
      }
    ]
],
  "id": 1
}
'
```

Response body #2

```json5
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "script": "DAtleHBpcmVkLm5lbxHAHwwNZ2V0QWxsUmVjb3JkcwwUtsvAuQCZmxOMoLKgXYpTdrdVg1NBYn1bUg==",
        "state": "FAULT",
        "gasconsumed": "622077",
        "exception": "An unhandled exception was thrown. The name has expired.",
        "stack": []
    }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.neo.link/reference/api-reference/deleterecord.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
