# Delete a page

`DELETE /api/v1/templates/{template}/versions/{version}/pages/{page}`

Remove a tab that holds nothing.

A page that still holds sections is refused, and the answer says how many. Take the sections off first, or move them to another page, so that nothing is lost by accident.

The last page of a version is refused too. A version with no page could not be published, and a structure nobody can fill is not one.

## Path parameters

- `template` (uuid, required): The id of the template. A path that is not a uuid answers 404 without a query being run, so neither the slug nor a sequential number reaches anything here.
- `version` (integer, required): The number of the version within its template, counting from 1, which is the number shown in the version history and the number a change note refers to. It is not a row id, so version 1 of one template and version 1 of another are different things reached through different templates.
- `page` (uuid, required): The id of the page.

## Returns

Nothing. A page that still holds sections, and the last page of a version, both answer 422.

## Rate limit

Sixty requests per minute, per user, shared by every key and device. Every answer carries the budget left in `X-RateLimit-Remaining`.

## Request

```sh
curl https://my.monicahq.com/api/v1/templates/7b1c4e92-3d58-4f07-9a26-8c5b0e14d3af/versions/4/pages/a1f7b3c8-6e42-4d09-8b57-1c9e0f2a4d36 \
  -X DELETE \
  -H "Authorization: Bearer $MONICA_TOKEN"
```

```javascript
const response = await fetch('https://my.monicahq.com/api/v1/templates/7b1c4e92-3d58-4f07-9a26-8c5b0e14d3af/versions/4/pages/a1f7b3c8-6e42-4d09-8b57-1c9e0f2a4d36', {
  method: 'DELETE',
  headers: { Authorization: `Bearer ${token}` },
})
```

```php
$response = Http::withToken($token)->delete('https://my.monicahq.com/api/v1/templates/7b1c4e92-3d58-4f07-9a26-8c5b0e14d3af/versions/4/pages/a1f7b3c8-6e42-4d09-8b57-1c9e0f2a4d36');
```

## Response

`204`, with no body.
