Overview
PUT/discussion/topics/{id}discussion

Edit a topic title (author/admin) and/or moderation flags (community moderator)

Replace a record in topics by id.

Auth: bearerAuth — calls run as the authenticated user.

Parameters
  • idpathstring
Request body

application/json · optional

  • titleoptionalstring
  • isPinnedoptionalboolean

    Community moderator only.

  • isLockedoptionalboolean

    Community moderator only.

  • answeredPostIdoptionalstring?

    Topic author or community moderator; must be a live post in this topic (or null to clear).

Example
{
  "title": "string",
  "isPinned": true,
  "isLocked": true,
  "answeredPostId": "string"
}
Responses
200

The updated topic

  • idstring
  • communityIdstring

    The community instance this topic belongs to.

  • customerIdoptionalstring

    Author (server-stamped principal). Omitted on the public surface.

  • titlestring
  • categoryIdoptionalstring?
  • isPinnedboolean
  • isLockedboolean
  • isPublicboolean
  • replyCountinteger
  • answeredPostIdoptionalstring?
  • lastActivityAtstring
  • createdAtstring
  • updatedAtstring
  • excerptoptionalstring?

    LIST routes only: the opening post’s leading prose, flattened from markdown server-side (≤240 chars; null when its body doc was soft-deleted). Absent on single-topic reads and create/update responses.

  • authorNameoptionalstring?

    Authed COMMUNITY list route only: the author’s display name. Never on the public surface or the flat /discussion/topics list.

  • authorSlugoptionalstring?

    Authed COMMUNITY list route only: the author’s public handle. Never on the public surface or the flat /discussion/topics list.

  • authorAvatarUrloptionalstring?

    Authed COMMUNITY list route only: the author’s avatar URL. Never on the public surface or the flat /discussion/topics list.

Example
{
  "id": "string",
  "communityId": "string",
  "customerId": "string",
  "title": "string",
  "categoryId": "string",
  "isPinned": true,
  "isLocked": true,
  "isPublic": true,
  "replyCount": 0,
  "answeredPostId": "string",
  "lastActivityAt": "string",
  "createdAt": "string",
  "updatedAt": "string",
  "excerpt": "string",
  "authorName": "string",
  "authorSlug": "string",
  "authorAvatarUrl": "string"
}
400

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
401

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
403

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
404

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
Code examples
cURL
curl -X PUT "https://api.agenticdeveloperhub.com/discussion/topics/{id}" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "string",
  "isPinned": true,
  "isLocked": true,
  "answeredPostId": "string"
}'
JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/discussion/topics/{id}", {
  method: "PUT",
  headers: {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json"
  },
  body: "{\n  \"title\": \"string\",\n  \"isPinned\": true,\n  \"isLocked\": true,\n  \"answeredPostId\": \"string\"\n}",
});
const data = await res.json();