---
title: "Update an SMS topic"
description: "Update an SMS topic's name, description or default_opt_in, or pass { \"archived\": true | false } to archive or restore it. `PATCH /api/v1/sms/topics/{id}`"
url: https://www.unitpost.com/docs/sms/patch-sms-topics-id
section: "SMS API reference"
updated: 2026-10-13
---
# Update an SMS topic

`PATCH /api/v1/sms/topics/{id}`

Update an SMS topic's name, description or `default_opt_in`, or pass `{ "archived": true | false }` to archive or restore it. Archiving is blocked with `409` while an active SMS campaign or a live automation still uses the topic. Requires the `topics:write` capability.

## Parameters

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

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | no | — |
| `description` | string \| null | no | — |
| `default_opt_in` | boolean | no | — |

## Response fields (200)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | — |
| `id` | string | yes | — |
| `name` | string | yes | — |
| `description` | string \| null | yes | — |
| `channel` | enum | yes | Which channel the topic belongs to. Email topics are managed under `/email/topics`, SMS topics under `/sms/topics`. One of: `email`, `sms`. |
| `default_opt_in` | boolean | yes | — |
| `created_at` | string | yes | — |
| `updated_at` | string | yes | — |

## Responses

| Status | Description |
| --- | --- |
| 200 | The updated SMS topic. |
| 401 | Missing or invalid API key. |
| 403 | Insufficient scope, or restoring needs a plan with topics. |
| 404 | SMS topic not found, or SMS is not enabled. |
| 409 | Name taken, or the topic is in use by an active campaign or automation. |
| 422 | Validation error. |

## Example request

```bash
curl -X PATCH 'https://www.unitpost.com/api/v1/sms/topics/top_123' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'User-Agent: my-app/1.0' \
  -H 'Content-Type: application/json' \
  -d '{ }'
```

## Example response (200)

```json
{
  "object": "topic",
  "id": "id_123",
  "name": "Example",
  "description": "string",
  "channel": "email",
  "default_opt_in": false,
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}
```

## Links

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