---
title: "Update a topic"
method: PATCH
path: "/topics/{id}"
tags: ["Topics"]
---

# Update a topic

`PATCH /topics/{id}`

## Request

- Base URL: `https://api.eusend.dev`
- URL: `https://api.eusend.dev/topics/{id}`
- Auth: HTTP bearer

Name, description and visibility. `default_subscription` is rejected: it is a consent decision, and changing it would start or stop mail for every contact who never chose.

## Path parameters

- `id` string, uuid, required

## Request body

- UpdateTopicRequest
  - `name` string
  - `description` string, nullable: Send `null` to clear it.
  - `visibility` 'public' | 'private'

## Response `200`

Updated.

- Topic
  - `id` string, uuid, required
  - `name` string, required
  - `description` string, nullable, required
  - `defaultSubscription` 'opt_in' | 'opt_out', required: What a contact who has never expressed a preference receives. Fixed at creation.
  - `visibility` 'public' | 'private', required
  - `subscriberCount` integer: Contacts who explicitly opted in. Returned by create and list, not by get. For an `opt_out` topic this is the reachable audience; for an `opt_in` topic it is not, since everyone who never chose is subscribed too.
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, nullable

## Other responses

- `400`: The request body or query failed validation (`VALIDATION_ERROR`).
- `401`: Missing, malformed, or revoked API key (`UNAUTHORIZED`).
- `403`: The key exists but may not reach this resource — a `sending_access` key outside the send paths, a test-mode key writing live state, or an account on hold (`FORBIDDEN`, `ACCOUNT_RESTRICTED`).
- `404`: No such resource on this organization (`NOT_FOUND`).
- `409`: Another topic already has this name (`CONFLICT`).
- `429`: Rate limit exceeded (`RATE_LIMITED`).
- `500`: Unexpected server error (`INTERNAL_ERROR`). Carries `request_id`.

---

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