---
title: "Update an SMS topic"
method: PATCH
path: "/sms/topics/{id}"
tags: ["SMS topics"]
---

# Update an SMS topic

`PATCH /sms/topics/{id}`

## Request

- Base URL: `https://www.unitpost.com/api/v1`
- URL: `https://www.unitpost.com/api/v1/sms/topics/{id}`
- Auth: HTTP bearer

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.

## Request body

- TopicUpdate
  - `name` string
  - `description` string, nullable
  - `default_opt_in` boolean

## Response `200`

The updated SMS topic.

- Topic
  - `object` 'topic', required
  - `id` string, required
  - `name` string, required
  - `description` string, nullable, required
  - `channel` 'email' | 'sms', required: Which channel the topic belongs to. Email topics are managed under `/email/topics`, SMS topics under `/sms/topics`.
  - `default_opt_in` boolean, required
  - `created_at` string, required
  - `updated_at` string, required

## Other responses

- `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.

---

[API](https://skmtc.dev/unitpost/apis/unitpost-api.md) · [All operations](https://skmtc.dev/unitpost/apis/unitpost-api/llms.txt) · [OpenAPI document](https://skmtc.dev/unitpost/apis/unitpost-api/revisions/86ff7c890967?raw)
