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

# Update a topic

`PATCH /v2/topics/{topicKey}`

## Request

- Base URL: `https://api.notifly.io`
- URL: `https://api.notifly.io/v2/topics/{topicKey}`
- Auth: API key in header `Authorization`

Update a topic name or data by its unique key identifier **topicKey**

## Path parameters

- `topicKey` string, required

## Request body

- UpdateTopicRequestDto
  - `name` string: The display name for the topic
  - `data` object, nullable: Additional custom data associated with the topic. Flat key-value pairs of scalars (string, number, boolean, string[]). Maximum size: 64KB. Pass null to clear.

## Response `200`

OK

- object
  - `data` TopicResponseDto
    - `_id` string, required: The identifier of the topic
    - `key` string, required: The unique key of the topic
    - `name` string: The name of the topic
    - `data` object: Additional custom data associated with the topic
    - `createdAt` string: The date the topic was created
    - `updatedAt` string: The date the topic was last updated

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `405`: Method Not Allowed
- `409`: Conflict
- `413`: Payload Too Large
- `414`: URI Too Long
- `415`: Unsupported Media Type
- `422`: Unprocessable Entity
- `429`: The client has sent too many requests in a given amount of time.
- `500`: Internal Server Error
- `503`: The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.

---

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