> ## Documentation Index
> Fetch the complete documentation index at: https://www.openrevenue.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete project

> Permanently deletes a project and all its analytics data. Requires a write-scoped API key and `{"confirm":true}` in the JSON body. This action cannot be undone.

**domain** `string` *required*

Your project's domain, e.g. `example.com`.

## Response

**ok** `boolean`

True when the project was deleted successfully.

## Errors

| Status | Error | Description |
| - | - | - |
| `400` | `Pass {"confirm":true}…` | Missing confirm:true in the request body. |
| `401` | `Invalid or missing API key` | The Authorization header is missing or the Bearer token is invalid. |
| `403` | `API key is read-only` | The key does not include the write scope. |
| `404` | `Project not found` | No project with that domain exists for the authenticated user. |

```javascript JavaScript theme={"theme":{"light":"one-light","dark":"one-dark-pro"}}
const res = await fetch("https://api.openrevenue.com/api/v1/projects/mysite.com", {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${OPENREVENUE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ confirm: true }),
})

const result = await res.json()
```

```bash cURL theme={"theme":{"light":"one-light","dark":"one-dark-pro"}}
curl -X DELETE https://api.openrevenue.com/api/v1/projects/mysite.com \
  -H "Authorization: Bearer openrevenue_your_key" \
  -H "Content-Type: application/json" \
  -d '{"confirm":true}'
```

```json 200 theme={"theme":{"light":"one-light","dark":"one-dark-pro"}}
{
  "ok": true
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.