> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.beehiiv.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.beehiiv.com/_mcp/server.

# Update content tag <Badge intent="info" minimal outlined>OAuth Scope: posts:write</Badge>

PATCH https://api.beehiiv.com/v2/publications/{publicationId}/content_tags/{contentTagId}
Content-Type: application/json

Update a content tag. Only the provided fields are changed. Renaming a tag keeps its slug unless a new slug is provided.

Reference: https://developers.beehiiv.com/api-reference/content-tags/update

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `publicationId` (string, required) — The prefixed ID of the publication object
- `contentTagId` (string, required) — The prefixed ID of the content tag object

### Body (application/json)

This endpoint expects an object.

- `display` (string, optional) — The name of the content tag as shown on the website.
- `slug` (string, optional) — The URL slug of the content tag's page.
- `description` (string, optional) — A description of the content tag.

## Response

### 200

OK

- `data` (ContentTag, required)

## Errors

### 400 Bad Request Error

Bad Request

- `status` (integer, required)
- `statusText` (string, required)
- `errors` (list of ErrorDetail, required)

### 401 Unauthorized Error

Unauthorized. The API key or OAuth access token is missing, invalid, or expired.

- `status` (integer, required)
- `statusText` (string, required)
- `errors` (list of ErrorDetail, required)

### 404 Not Found Error

Resource Not Found

- `status` (integer, required)
- `statusText` (string, required)
- `errors` (list of ErrorDetail, required)

### 429 Too Many Requests Error

Rate Limit Exceeded

- `status` (integer, required)
- `statusText` (string, required)
- `errors` (list of ErrorDetail, required)

### 500 Internal Server Error

Internal Server Error

- `status` (integer, required)
- `statusText` (string, required)
- `errors` (list of ErrorDetail, required)

## Types

### ContentTag

- `id` (string, required) — The prefixed ID of the content tag.
- `display` (string, required) — The name of the content tag as shown on the website. Post responses list content tags by this name in lowercase.
- `created_at` (integer, required) — The time the content tag was created. Measured in seconds since the Unix epoch.
- `updated_at` (integer, required) — The time the content tag was last updated. Measured in seconds since the Unix epoch.
- `slug` (string, optional) — The URL slug of the content tag's page on the website.
- `description` (string, optional) — A description of the content tag.

### ErrorDetail

- `message` (string, required)
- `code` (string, required)

## Examples

**Request**

```json
{
  "description": "Coverage of the healthcare industry."
}
```

**Response**

```json
{
  "data": {
    "id": "content_tag_00000000-0000-0000-0000-000000000000",
    "display": "Healthcare",
    "created_at": 1700000000,
    "updated_at": 1700000000,
    "slug": "healthcare",
    "description": "Coverage of the healthcare industry."
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/content_tags/content_tag_00000000-0000-0000-0000-000000000000"

payload = { "description": "Coverage of the healthcare industry." }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/content_tags/content_tag_00000000-0000-0000-0000-000000000000';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"description":"Coverage of the healthcare industry."}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/content_tags/content_tag_00000000-0000-0000-0000-000000000000"

	payload := strings.NewReader("{\n  \"description\": \"Coverage of the healthcare industry.\"\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/content_tags/content_tag_00000000-0000-0000-0000-000000000000")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"description\": \"Coverage of the healthcare industry.\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/content_tags/content_tag_00000000-0000-0000-0000-000000000000")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"description\": \"Coverage of the healthcare industry.\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/content_tags/content_tag_00000000-0000-0000-0000-000000000000', [
  'body' => '{
  "description": "Coverage of the healthcare industry."
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/content_tags/content_tag_00000000-0000-0000-0000-000000000000");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"description\": \"Coverage of the healthcare industry.\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["description": "Coverage of the healthcare industry."] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/content_tags/content_tag_00000000-0000-0000-0000-000000000000")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```