---
title: "Deleting domains on expiration date"
url: "https://help.internetx.com/en/api/epp-deleting-domains-on-expiration-date/"
lang: "en"
section: "API reference — EPP API"
breadcrumb: "EPP API guides"
updated: "2023-09-27"
---

# Deleting domains on expiration date

Instructions for fully automating the deletion of domains on their expiration date. Since the EPP standard does not support deleting domains on expiration date, the functionality is made possible by a [domain extension](/en/api/epp-domain-extensions/).

## Inquiring domain data

The domain data of the domain that is to be deleted must be inquired beforehand in order to obtain the expire date (`exDate`).

```
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
    <command>
        <info>
            <domain:info xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
                <domain:name hosts="all">domain.de</domain:name>
            </domain:info>
        </info>
        <clTRID>ABC-12345</clTRID>
    </command>
</epp>
```

```
<epp xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
    <response>
        <result code="1000">
            <msg lang="en">Command completed successfully</msg>
        </result>
        <resData>
            <domain:infData>
                <domain:name>domain.com</domain:name>
                <domain:roid>11109997-domain.com</domain:roid>
                <domain:registrant>10000001</domain:registrant>
                <domain:contact type="admin">10000001</domain:contact>
                <domain:contact type="tech">10000001</domain:contact>
                <domain:ns>
                    <domain:hostAttr>
                        <domain:hostName>ns1.nameserver.com</domain:hostName>
                    </domain:hostAttr>
                    <domain:hostAttr>
                        <domain:hostName>ns2.nameserver.com</domain:hostName>
                    </domain:hostAttr>
                </domain:ns>
                <domain:clID>user1, 4</domain:clID>
                <domain:crID>user1, 4</domain:crID>
                <domain:crDate>2011-02-15T14:44:41.000Z</domain:crDate>
                <domain:upID>user1, 4</domain:upID>
                <domain:upDate>2017-06-09T09:06:49.000Z</domain:upDate>
                <domain:exDate>2018-07-31T14:44:41.000Z</domain:exDate>
                <domain:authInfo>
                    <domain:pw>123ABC456DEF</domain:pw>
                </domain:authInfo>
            </domain:infData>
        </resData>
        <extension>
            <domainrobot:domain xmlns:domainrobot="urn:org:domainrobot:ns:ext-1.0">
                <domainrobot:zonec>10000001</domainrobot:zonec>
                <domainrobot:trustee>0</domainrobot:trustee>
                <domainrobot:privacy>0</domainrobot:privacy>
            </domainrobot:domain>
        </extension>
        <trID>
            <clTRID>ABC-12345</clTRID>
        </trID>
    </response>
</epp>
```

## Creating a cancelation on expiration date

With the help of the _DomainDelete_ command and the domain extension `**deletion**` a cancelation on the expiration date is created. Inside of the `deletion` tag the value from the `exDate` which is the _DomainInfo_ response is used.

Warning

If the cancelation date is not submitted, the cancelation is executed immediately. The date must be RFC conform.

Example: 2018-07-31T12:47:12.000Z

```
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
    <command>
        <delete>
            <domain:delete xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
                <domain:name>domain.com</domain:name>
            </domain:delete>
        </delete>
 		<extension>
            <domainrobot:domain xmlns:domainrobot="urn:org:domainrobot:ns:ext-1.0">
                <domainrobot:deletion>2018-07-31T12:47:12.000Z</domainrobot:deletion>
            </domainrobot:domain>
        </extension>
		<clTRID>ABC-12345</clTRID>
    </command>
</epp>
```

```
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
    <response>
        <result code="1001">
            <msg lang="en">Command completed successfully; action pending</msg>
        </result>
        <extension>
            <domainrobot:domain xmlns:domainrobot="urn:org:domainrobot:ns:ext-1.0">
                <domainrobot:deletion>2018-07-31T12:47:12.000Z</domainrobot:deletion>
            </domainrobot:domain>
        </extension>
        <trID>
            <clTRID>ABC-12345</clTRID>
        </trID>
    </response>
</epp>
```
