---
updatedAt: 2025-11-11T21:42:56.000Z
agentTools:
  projectIndex: https://domains.opensrs.guide/llms.txt
---

# revoke (domain)

Removes the domain at the registry. Use this command to request a refund for a domain purchase. This call can refund/revoke only one domain at the time.

> 📘 Note:
>
> A refund can be issued for only those domains which fall within the specified grace period as defined by each registry.

## Request parameters for revoke (domain)

## Standard parameters

* **action** = revoke
* **object** = domain

## Attributes

Parameters within the **attributes** associative array are described below.

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th>
        Parameter name
      </th>

      <th>
        Obligation
      </th>

      <th>
        Definition/Value
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        domain
      </td>

      <td>
        Required
      </td>

      <td>
        Domain to be revoked.
      </td>
    </tr>

    <tr>
      <td>
        notes
      </td>

      <td>
        Optional
      </td>

      <td>
        Information relevant to action. Notes are saved to domain notes.
      </td>
    </tr>
  </tbody>
</Table>

## Response parameters for revoke (domain)

## Standard parameters

* **action** = reply
* **object** = domain
* **is\_success** = a Boolean is returned, indicating success or failure of the\
  request
* **response\_code** = response code indicating outcome of the request
* **response\_text** = message describing the outcome of the request

## Attributes

If the request is successful, the **attributes** associative array may include the\
following:

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th>
        Parameter name
      </th>

      <th>
        Obligation
      </th>

      <th>
        Definition/Value
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        charge
      </td>

      <td>
        Optional
      </td>

      <td>
        Value indicating whether the reseller has been charged:

        * **0**—No charge
        * **1**—Indicates a Value
      </td>
    </tr>

    <tr>
      <td>
        price
      </td>

      <td>
        Optional
      </td>

      <td>
        The sum of money of that the reseller is charged.
      </td>
    </tr>

    <tr>
      <td>
        total\_refund
      </td>

      <td>
        Optional
      </td>

      <td>
        The sum of money the reseller was refunded
      </td>
    </tr>

    <tr>
      <td>
        deletion\_id
      </td>

      <td>
        Optional
      </td>

      <td>
        A unique identifier to denote the revoke action
      </td>
    </tr>
  </tbody>
</Table>

## Examples for revoke (domain)

**Request**

```xml
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<!DOCTYPE OPS_envelope SYSTEM 'ops.dtd'>
<OPS_envelope>
    <header>
        <version>0.9</version>
    </header>
    <body>
        <data_block>
            <dt_assoc>
                <item key="protocol">XCP</item>
                <item key="action">REVOKE</item>
                <item key="object">DOMAIN</item>
                <item key="attributes">
                    <dt_assoc>
                        <item key="domain">thegreatesttest.net</item>
                        <item key="notes">this is a test</item>
                    </dt_assoc>
                </item>
            </dt_assoc>
        </data_block>
    </body>
</OPS_envelope>
```

**Response**

```xml If successful
<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
<!DOCTYPE OPS_envelope SYSTEM "ops.dtd">
<OPS_envelope>
 <header>
  <version>0.9</version>
  </header>
 <body>
  <data_block>
   <dt_assoc>
    <item key="protocol">XCP</item>
    <item key="object">DOMAIN</item>
    <item key="response_text">Domain thegreatesttest.net revoked successfully</item>
    <item key="action">REPLY</item>
    <item key="attributes">
     <dt_assoc>
      <item key="charge">0</item>
      <item key="price">0</item>
      <item key="total_refund">15.00</item>
      <item key="deletion_id">43062543</item>
     </dt_assoc>
    </item>
    <item key="response_code">200</item>
    <item key="is_success">1</item>
   </dt_assoc>
  </data_block>
 </body>
</OPS_envelope>
```
```xml If unsuccessful
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<!DOCTYPE OPS_envelope SYSTEM 'ops.dtd'>
<OPS_envelope>
    <header>
        <version>0.9</version>
    </header>
    <body>
        <data_block>
            <dt_assoc>
                <item key="protocol">XCP</item>
                <item key="action">REPLY</item>
                <item key="object">DOMAIN</item>
                <item key="is_success">0</item>
                <item key="response_text">Domain not found.</item>
                <item key="response_code">461</item>
            </dt_assoc>
        </data_block>
    </body>
</OPS_envelope>
```