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

# Deleting and cleanup

> Delete projects and sheets one at a time or up to 100 per call.

Deleting a project or sheet removes it: it is no longer returned by or accessible through the API.

## Endpoints

```
DELETE /v1/projects/{projectId}    → delete one project
POST   /v1/projects/bulk-delete    → delete up to 100 projects
DELETE /v1/sheets/{sheetId}        → delete one sheet
POST   /v1/sheets/bulk-delete      → delete up to 100 sheets
```

[Delete Project](https://connectionshub.atlastube.com/docs/api/reference/projects/delete-project.md) · [Bulk Delete Projects](https://connectionshub.atlastube.com/docs/api/reference/projects/bulk-delete-projects.md) · [Delete Sheet](https://connectionshub.atlastube.com/docs/api/reference/sheets/delete-sheet.md) · [Bulk Delete Sheets](https://connectionshub.atlastube.com/docs/api/reference/sheets/bulk-delete-sheets.md)

## Deleting one resource

A `DELETE` returns **`204 No Content`** on success:

```bash theme={null}
curl -X DELETE "https://api.calcs.com/v1/projects/{projectId}" \
  -H "Authorization: Bearer YOUR_API_KEY"

curl -X DELETE "https://api.calcs.com/v1/sheets/{sheetId}" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

An ID that does not exist or is not accessible with your key returns **`404 Not Found`**:

```json theme={null}
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Project not found."
  }
}
```

Deleting the same ID again also returns `404`, so retries are safe.

## When deletes are disabled

Deletes can be turned off for an API key. Every delete endpoint, single and bulk, then returns **`403 Forbidden`** with `error.code` `ACCESS_DENIED`, and nothing is deleted. Retrying will not help; [contact Atlas Tube](https://www.atlastube.com/contact-us/) if your key needs to delete.

## Deleting in bulk

Send up to **100 IDs** in one call. Each ID is handled on its own; the call is **not** all-or-nothing.

```bash theme={null}
curl -X POST "https://api.calcs.com/v1/sheets/bulk-delete" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"sheetIds": ["8b569763-56f7-41bb-a5fe-8c44e7cf5459", "0ad00c8b-03e9-467c-aa29-27d28f6a056f"]}'
```

The project route is the same, with a `projectIds` array.

The response lists one result per ID, in request order. When **every** ID is deleted you get **`200 OK`**. When **at least one** fails you get **`207 Multi-Status`**; the others are still deleted:

```json theme={null}
{
  "results": [
    { "id": "8b569763-56f7-41bb-a5fe-8c44e7cf5459", "status": "deleted" },
    { "id": "0ad00c8b-03e9-467c-aa29-27d28f6a056f", "status": "error", "code": "NOT_FOUND" }
  ]
}
```

Check each item's `status` rather than relying on the HTTP status alone.

| `code` | Meaning | What to do |
| - | - | - |
| `NOT_FOUND` | The ID does not exist or is not accessible with this key | Nothing: it is already gone |
| `UPSTREAM_ERROR` | The deletion could not be completed; the ID may still exist | Retry that ID, and contact support if it persists |

Treat an unrecognised code as retryable.

### Request validation

The request is rejected with **`422 Unprocessable Entity`**, before anything is deleted, when the ID array is missing, empty, contains a non-UUID or a duplicate, or has more than 100 IDs. The list is never silently truncated. IDs are compared case-insensitively, so two spellings of the same UUID count as duplicates:

```json theme={null}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "projectIds cannot contain more than 100 ids.",
    "details": [
      { "field": "projectIds", "message": "projectIds cannot contain more than 100 ids." }
    ]
  }
}
```

## Notes

* **Deleting a project deletes its sheets.** You do not need to delete them separately. Its sheets stop appearing and requests for them return `404`.
* **Repeating a delete is safe.** A repeated single delete returns `404`; in a bulk call an already-deleted ID comes back as `NOT_FOUND`.


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