Update Topic

Update a topic's name, description, or visibility.

PATCH/topics/{topic_id}

Requires a full_access API key.

Path Parameters

topic_idstringrequired

The topic ID (UUID).

Body Parameters

namestring

The new topic name. Max 50 characters.

descriptionstring

The new description. Max 200 characters.

visibilitystring

The new visibility: "public" or "private".

Response Fields

objectstring

Always "topic".

idstring

The topic ID.

curl -X PATCH 'https://api.postflare.app/topics/b2c3d4e5-f6a7-8901-bcde-f12345678901' \
  -H 'Authorization: Bearer re_xxxxxxxxx' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Latest Product News",
    "visibility": "public"
  }'
const response = await fetch(
  'https://api.postflare.app/topics/b2c3d4e5-f6a7-8901-bcde-f12345678901',
  {
    method: 'PATCH',
    headers: {
      'Authorization': 'Bearer re_xxxxxxxxx',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      name: 'Latest Product News',
      visibility: 'public',
    }),
  }
);

const data = await response.json();

Response

Response
{
  "object": "topic",
  "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
}