---
title: "PATCH /v1/courses/{courseId}/topics/{id}"
method: PATCH
path: "/v1/courses/{courseId}/topics/{id}"
tags: ["courses"]
---

# PATCH /v1/courses/{courseId}/topics/{id}

`PATCH /v1/courses/{courseId}/topics/{id}`

Updates one or more fields of a topic. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding topic or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `FAILED_PRECONDITION` if there exists a topic in the course with the same name. * `NOT_FOUND` if the requested course or topic does not exist

## Path parameters

- `courseId` string, required
- `id` string, required

## Query parameters

- `updateMask` string

## Request body

- Topic — Topic created by a teacher for the course
  - `courseId` string — Identifier of the course. Read-only.
  - `updateTime` string, google-datetime — The time the topic was last updated by the system. Read-only.
  - `topicId` string — Unique identifier for the topic. Read-only.
  - `name` string — The name of the topic, generated by the user. Leading and trailing whitespaces, if any, are trimmed. Also, multiple consecutive whitespaces are collapsed into one inside the name. The result must be a non-empty string. Topic names are case sensitive, and must be no longer than 100 characters.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/classroom.md) · [All operations](https://skmtc.net/google/apis/classroom/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/classroom/versions/1b98f151d40b/schema)
