Skip to main content
PUT
/
blogs
/
v3
/
topics
/
{topic-id}
Update a blog topic
curl --request PUT \
  --url https://api.hubapi.com/blogs/v3/topics/{topic-id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Hey an updated Topic",
  "description": "This is an updated topic description"
}
'
{
  "id": 349001123123123,
  "portalId": 62515,
  "name": "Hey an updated topic",
  "slug": "hey-an-updated-topic",
  "description": "This is an updated topic description",
  "created": 1381896200000,
  "updated": 1381896200000,
  "deletedAt": 0,
  "totalPosts": null,
  "livePosts": null,
  "lastUsed": null,
  "associatedBlogIds": [],
  "publicUrl": null,
  "status": "inactive"
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

topic-id
string
required

Unique identifier for a particular topic

Query Parameters

casing
enum<string>

Use the casing=snake parameter to change the API's casing for returned JSON fields (below) to snake_case, rather than camelCase, which is the default. This option is provided for backwards-compatibility and ease of migration from Content v2 APIs, which used snake_case.

Available options:
snake

Body

application/json
name
string

The topic name

description
string

The topic description

Response

successful operation

id
integer<int64>

The unique id of the topic

portalId
integer

The hub id

name
string

The topic name

slug
string

The URL-friendly version of the topic, used in blog urls

description
string

The topic description

created
integer<int64>

When the topic was first created, in milliseconds since the epoch

updated
integer<int64>

When the topic was last updated, in milliseconds since the epoch

deletedAt
integer<int64>

When the topic was deleted, in milliseconds since the epoch. Zero if the topic was never deleted. Use a DELETE request to properly soft delete a topic - do not set this value directly.

totalPosts
integer | null

The total count of posts (including drafts) associated with this topic.

livePosts
integer | null

The total count of published posts associated with this topic.

lastUsed
integer<int64> | null

The most recent publish date of a blog post associated with this topic, in milliseconds since the epoch.

associatedBlogIds
integer[]

A list of the blog IDs where this topic has been used.

publicUrl
string | null

The public URL for the topic

status
string

The status of the topic