# Delete an invite template

Source: https://api-docs.magicdoor.com/api-reference/tenant-portal-invite-templates/delete-invite-template

Deletes a template the company created. MagicDoor's built-in templates cannot be deleted — reset them instead. Requires the `settings:delete` permission.

`DELETE https://services.magicdoor.com/settings/company-portal/settings/tenant-portal-invite-templates/{id}`

**Authentication:** bearer token in the `Authorization` header, as `Bearer <token>`.

## Path parameters

- `id` (string, required) — The template's Snowflake id, as returned by the list endpoint. Example: `1849037281920516096`.

## Example request

```bash
curl --request DELETE \
  --url 'https://services.magicdoor.com/settings/company-portal/settings/tenant-portal-invite-templates/1849037281920516096' \
  --header 'Authorization: Bearer <token>'
```

## Responses

### 200 — The template was deleted. The response has no body.

### 401 — The access token is missing, expired, or invalid.

### 403 — The caller does not hold the `settings:delete` permission.

### 404 — No tenant invite template with that id belongs to the caller's company.

### 422 — The template is one of MagicDoor's built-in ones, which cannot be deleted.

```json
{
  "type": "https://httpstatuses.com/422",
  "title": "Unprocessable Entity",
  "status": 422,
  "detail": "Only custom invite templates can be deleted.",
  "instance": "/company-portal/settings/tenant-portal-invite-templates/1849037281920516096",
  "traceId": "0HN7GK9C2M4PQ",
  "entityType": "PortalInviteTemplate",
  "entityId": "1849037281920516096"
}
```
