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()
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}'
{
"ok": true
}
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.
DELETE
/
api
/
v1
/
projects
/
{domain}
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()
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}'
{
"ok": true
}
Response
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. |
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()
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}'
{
"ok": true
}
Was this page helpful?