Replace all repository topics

Note: Repository topics on GitHub Enterprise are currently available for developers to preview. To use this endpoint, you must provide a custom media type in the Accept header:

application/vnd.github.mercy-preview+json

Warning: The API may change without advance notice during the preview period. Preview features are not supported for production use. If you experience any issues, contact your GitHub Enterprise site administrator.

PUT /repos/:owner/:repo/topics

Input

Name Type Description
names array of strings 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 cannot contain uppercase letters.

Example

{
  "names": [
    "octocat",
    "atom",
    "electron",
    "api"
  ]
}

Response

Status: 200 OK
{
  "names": [
    "octocat",
    "atom",
    "electron",
    "api"
  ]
}