# RevCent MCP Guide: `DeleteSite`

This guide is written for AI/MCP clients that need to delete a RevCent Site safely and only after explicit user confirmation.

---

## Primary Operation

```text
DeleteSite
```

**Title:** Delete A Site

**Purpose:** Delete an existing RevCent Site by Site ID.

`DeleteSite` is irreversible. It removes the Site data, routing, and content associated with the Site.

---

## Critical Warning

Deleting a Site is destructive and cannot be undone.

Before calling `DeleteSite`, AI/MCP clients must clearly explain:

- the Site will be deleted permanently,
- Site content and Site routing will be removed,
- any custom domain or DNS records still pointed at the Site will no longer reach a working RevCent Site,
- external DNS records may still exist with the user's DNS provider, but they will be non-reachable for the deleted Site until the user changes them,
- repository, code, and business-logic work tied to the Site should be backed up or preserved separately before deletion if the user needs it,
- the user should confirm the exact Site ID and Site name before deletion.

Recommended confirmation wording:

```text
Deleting this Site is irreversible. It will remove the Site data, routing, and content. Any DNS currently pointed at this Site will no longer reach a working RevCent Site. Please confirm you want to permanently delete {Site Name} ({Site ID}).
```

Do not call `DeleteSite` based on ambiguous wording such as "remove this from the list," "hide this," "disconnect domain," or "stop traffic." Use the narrower operation when the user only wants to remove custom domain routing.

---

## DeleteSite vs RemoveTrackingDomainFromSite

Use the correct operation for the user's intent.

| User Intent | Operation |
|---|---|
| Permanently delete the Site and remove its Site data, routing, and content. | `DeleteSite` |
| Keep the Site but stop a custom Tracking Domain from routing to it. | `RemoveTrackingDomainFromSite` |
| Change the Site name, description, Payment Profile, Product Group, PayPal Account, or collaborators. | `EditSite` |
| Change Site code, design, page behavior, cart behavior, checkout logic, offer flow, or custom business logic. | Site repository workflow |

If the user only wants the domain to stop pointing at the Site, do not delete the Site. Use `RemoveTrackingDomainFromSite` after confirmation.

---

## When to Use

Good uses:

- permanently delete a RevCent Site the user no longer needs,
- remove a beta/test Site after the user confirms it should be destroyed,
- delete a duplicate or incorrectly created Site after checking the exact Site ID,
- remove Site routing and content when the user explicitly wants the Site deleted.

Do not use `DeleteSite` to edit configuration, remove only a Tracking Domain, troubleshoot logs, pause traffic, or change the Site repository.

---

## Required Preparation

Before calling `DeleteSite`:

1. Identify the exact Site ID.
2. Call `GetSite` if the current Site details are unknown.
3. Show the user the Site name, Site ID, Tracking Domain, and routing context when available.
4. Explain that deletion is irreversible.
5. Explain that DNS records still pointed at the Site will no longer reach a working RevCent Site.
6. Confirm whether the user needs to preserve repository code or other Site work before deletion.
7. Require explicit user confirmation before execution.

Never guess a Site ID. Never delete a Site from a partial or ambiguous match.

---

## Input Schema

`DeleteSite` requires a path parameter.

```json
{
  "site_id": "XXXXXXXXXXXXXXXXXXXX"
}
```

The request body is an empty object.

```json
{}
```

### Required Fields

| Field | Location | Type | Required | Description |
|---|---|---:|---:|---|
| `site_id` | Path | `string` | Yes | A 20-character Site ID. |

### Important Schema Rules

- Do not include unknown body properties.
- The request body should be an empty object.
- The Site ID must be a 20-character RevCent Site ID.
- The operation is irreversible.

---

## Output Schema

A successful `DeleteSite` response returns the deleted Site ID.

```json
{
  "api_call_id": "XXXXXXXXXXXXXXXXXXXX",
  "api_call_unix": 1710000000,
  "code": 1,
  "site_id": "XXXXXXXXXXXXXXXXXXXX",
  "result": "string"
}
```

### Output Fields

| Field | Type | Description |
|---|---:|---|
| `api_call_id` | `string` | A 20-character API call ID. |
| `api_call_unix` | `integer` | Unix timestamp of when the API call was initiated. |
| `code` | `integer` | API response code. `1` means success. |
| `site_id` | `string` | The 20-character Site ID that was deleted. |
| `result` | `string` | Human-readable operation result. |

---

## Example Request

Path value:

```json
{
  "site_id": "XXXXXXXXXXXXXXXXXXXX"
}
```

Body:

```json
{}
```

---

## Recommended Follow-Up

After a successful `DeleteSite` call:

1. Tell the user the Site was deleted.
2. Remind the user that DNS records still configured outside RevCent may need to be changed or removed.
3. Explain that existing DNS pointed at the deleted Site will no longer reach a working RevCent Site.
4. Use `GetSites` only if the user wants to confirm the remaining Site list.

---

## Best Practices

1. Require explicit confirmation before calling `DeleteSite`.
2. Prefer `RemoveTrackingDomainFromSite` when the user only wants to remove custom domain routing.
3. Check `GetSite` before deletion when Site details are uncertain.
4. Mention any attached Tracking Domain and routing context before deletion when available.
5. Remind the user to preserve repository code before deletion if they may need it later.
6. Do not describe deletion as reversible, temporary, hidden, paused, or archived.

---

## Final MCP Instruction

Use `DeleteSite` only when the user explicitly confirms permanent Site deletion and the exact Site ID is known. Deleting a Site is irreversible and will make DNS still pointed at the Site non-reachable for that deleted RevCent Site.



---
Document Parent Directory
* [Operations](https://revcent.com/documentation/markdown/mcp/operation/index.md) - AI/MCP details and overviews for operations available within the RevCent MCP.