Skip to content

Replace all repository topics

PUT
/repos/{owner}/{repo}/topics

API method documentation

owner
required
string

The account owner of the repository. The name is not case sensitive.

repo
required
string

The name of the repository without the .git extension. The name is not case sensitive.

Media typeapplication/json
object
names
required

An array of topics to add to the repository. Pass one or more topics to replace the set of existing topics. Send an empty array ([]) to clear all topics from the repository. Note: Topic names will be saved as lowercase.

Array<string>
Examples
Exampledefault
{
"names": [
"octocat",
"atom",
"electron",
"api"
]
}

Response

Media typeapplication/json
Topic

A topic aggregates entities that are related to a subject.

object
names
required
Array<string>
Examples
Exampledefault
{
"names": [
"octocat",
"atom",
"electron",
"api"
]
}

Resource not found

Media typeapplication/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Examplegenerated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Validation failed, or the endpoint has been spammed.

Media typeapplication/json
Validation Error Simple

Validation Error Simple

object
message
required
string
documentation_url
required
string
errors
Array<string>
Examplegenerated
{
"message": "example",
"documentation_url": "example",
"errors": [
"example"
]
}