---
title: "Get a template's usage"
description: "What uses a template, and whether a change would be accepted now: the campaigns that reference it, its live campaigns and automations, queued sends, and can_edit_content / can_unpublish with the reason when not. `GET /api/v1/email/templates/{id}/usage`"
url: https://www.unitpost.com/docs/email/get-email-templates-id-usage
section: "Email API reference"
updated: 2026-10-13
---
# Get a template's usage

`GET /api/v1/email/templates/{id}/usage`

What uses a template, and whether a change would be accepted now: the campaigns that reference it, its live campaigns and automations, queued sends, and `can_edit_content` / `can_unpublish` with the reason when not. Read it before an edit or delete: a content edit is refused while a live campaign renders the template, and a delete while any campaign uses it. Requires the `templates:read` capability.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | — |

## Response fields (200)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | — |
| `template_id` | string | yes | — |
| `campaigns` | object[] | yes | The campaigns that use it, any status, newest first: the newest 25 (`campaign_count` says how many in all). |
| `campaign_count` | integer | yes | How many campaigns use it in all. |
| `sent_count` | integer | yes | Emails sent from it, all time. |
| `live_campaigns` | object[] | yes | Scheduled, sending or paused campaigns: they render its current content when they send, so its content is locked. |
| `live_automations` | object[] | yes | Active or paused automations whose published version sends it: it can't be unpublished or deleted. |
| `pending_sends` | integer | yes | Queued or scheduled single sends that render it when they go out. |
| `system_locked` | boolean | yes | A template behind Unitpost's own emails: read-only. |
| `can_edit_content` | boolean | yes | Whether an update to its body, subject or category would be accepted now. |
| `content_blocked_reason` | string \| null | yes | — |
| `can_unpublish` | boolean | yes | Whether `status: "draft"` would be accepted now. |
| `unpublish_blocked_reason` | string \| null | yes | — |

## Responses

| Status | Description |
| --- | --- |
| 200 | Its usage. |
| 401 | Missing or invalid API key. |
| 403 | Insufficient scope. |
| 404 | Template not found. |
| 422 | A query key (this operation takes none). |

## Example request

```bash
curl -X GET 'https://www.unitpost.com/api/v1/email/templates/tmpl_123/usage' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'User-Agent: my-app/1.0'
```

## Example response (200)

```json
{
  "object": "template_usage",
  "template_id": "template_123",
  "campaigns": [
    {
      "id": "id_123",
      "name": "Example",
      "status": "draft",
      "created_at": "2026-01-01T00:00:00.000Z"
    }
  ],
  "campaign_count": 1,
  "sent_count": 1,
  "live_campaigns": [
    {
      "id": "id_123",
      "name": "Example",
      "status": "draft"
    }
  ],
  "live_automations": [
    {
      "id": "id_123",
      "name": "Example",
      "status": "active"
    }
  ],
  "pending_sends": 0,
  "system_locked": false,
  "can_edit_content": false,
  "content_blocked_reason": "string",
  "can_unpublish": false,
  "unpublish_blocked_reason": "string"
}
```

## Links

- HTML reference (with Node.js, Python, Ruby, PHP, Laravel, Go, Java, Rust, .NET and CLI examples): https://www.unitpost.com/docs/email/get-email-templates-id-usage
- OpenAPI 3.1 (full schemas): https://www.unitpost.com/api/v1/openapi.json
