Create, update & delete discussions

Open project-scoped discussion threads, rename them, and hard-delete them with the createDiscussion, updateDiscussion, and deleteDiscussion mutations.


A discussion is a standalone, project-scoped conversation thread — a place for a topic that isn’t tied to a single record. Discussions are Discussion objects in the API, and they live in a workspace (Project). Once a thread exists, replies are posted as comments with category: DISCUSSION (see Create, edit & delete comments).

  • Use createDiscussion to seed a new thread with a title and an opening body.
  • Use updateDiscussion to rename a thread — it edits the title only; the body is fixed once created.
  • Use deleteDiscussion to remove a thread. Unlike a comment delete, this is a hard delete.

To read discussions back, use the discussion query paths. The Discussion.comments field is deprecated — load replies with commentList(category: DISCUSSION) instead.

createDiscussion

Create a discussion in a workspace. The opening message is supplied as both html (rich content, sanitized server-side) and text (the plain-text fallback). The mutation returns the created Discussion.

Request

mutation CreateDiscussion {
  createDiscussion(
    input: {
      projectId: "project_123"
      title: "Q3 launch retro"
      html: "<p>What went well, what didn't?</p>"
      text: "What went well, what didn't?"
    }
  ) {
    id
    title
    html
    text
    createdAt
    user {
      id
      fullName
    }
    project {
      id
      name
    }
  }
}

Parameters

CreateDiscussionInput

ParameterTypeRequiredDescription
titleString!YesThe thread title.
htmlString!YesThe opening message as HTML. Sanitized server-side; embedded @mentions, images, and file attachments are extracted from it.
textString!YesThe plain-text rendering of the opening message, used in notifications, search, and clients that don’t render HTML.
projectIdString!YesThe workspace the discussion belongs to. Accepts a project id or slug.

The body (html / text) is set once at creation and is immutable afterward — updateDiscussion changes only the title. To revise the opening message, delete the thread and create a new one, or post a follow-up comment.

Response

{
  "data": {
    "createDiscussion": {
      "id": "clm4n8qwx000008l0g4oxdqn7",
      "title": "Q3 launch retro",
      "html": "<p>What went well, what didn't?</p>",
      "text": "What went well, what didn't?",
      "createdAt": "2026-05-29T14:02:11.000Z",
      "user": {
        "id": "clm4n8a1b000108l0c2d3e4f5",
        "fullName": "Dana Rao"
      },
      "project": {
        "id": "clm4n7zzz000008l0a1b2c3d4",
        "name": "Marketing"
      }
    }
  }
}

Returns

Returns the created Discussion.

Mentions, images & attachments

@mentions, inline images, and file attachments all travel inside the html field of the opening message — there are no separate arguments for them. To mention a user, include an anchor whose href is #view-profile-<userId>; the server rewrites it into a mention and notifies that user. The same convention applies when posting comment replies (see Create, edit & delete comments).

Errors

CodeWhen
PROJECT_NOT_FOUNDNo workspace matches the supplied projectId (id or slug).
FORBIDDENThe caller is VIEW_ONLY or COMMENT_ONLY in the workspace, isn’t a member, or it’s archived.
UNAUTHENTICATEDNo valid token was supplied.

updateDiscussion

Rename a discussion. This is the only mutable field: UpdateDiscussionInput carries just id and an optional title. The mutation returns the updated Discussion.

Request

mutation UpdateDiscussion {
  updateDiscussion(input: { id: "discussion_123", title: "Q3 launch retro (final)" }) {
    id
    title
    updatedAt
  }
}

Parameters

UpdateDiscussionInput

ParameterTypeRequiredDescription
idString!YesThe id of the discussion to rename.
titleStringNoThe new title. Trimmed server-side; omitting it (or sending blank) clears it to an empty string.

There is no editDiscussion mutation, and there is no way to change html / text, projectId, or any other field through this call — only the title.

Response

{
  "data": {
    "updateDiscussion": {
      "id": "clm4n8qwx000008l0g4oxdqn7",
      "title": "Q3 launch retro (final)",
      "updatedAt": "2026-05-29T15:18:44.000Z"
    }
  }
}

Returns

Returns the updated Discussion.

Errors

CodeWhen
DISCUSSION_NOT_FOUNDNo discussion exists with the given id.
FORBIDDENThe caller isn’t the creator or a project OWNER, is VIEW_ONLY/COMMENT_ONLY, or the project is archived.
UNAUTHENTICATEDNo valid token was supplied.

deleteDiscussion

Remove a discussion thread. This is a hard delete: before the row is removed, its reply chains are unlinked (threaded comment replies have their parentId cleared to release the foreign-key constraint), and a snapshot of the discussion is written to the organization’s Trash. The mutation returns a MutationResult.

This differs from deleteComment, which is a soft delete that keeps the row and blanks its body — see Create, edit & delete comments.

Request

deleteDiscussion takes the discussion id directly (not an input object) and returns a MutationResult.

mutation DeleteDiscussion {
  deleteDiscussion(id: "discussion_123") {
    success
    operationId
  }
}

Parameters

ParameterTypeRequiredDescription
idString!YesThe id of the discussion to delete.

Response

{
  "data": {
    "deleteDiscussion": {
      "success": true,
      "operationId": "clm4n8qwx000008l0g4oxdqn7"
    }
  }
}

Returns

FieldTypeDescription
successBoolean!true when the discussion was deleted.
operationIdStringIdentifier for the mutation, useful for correlating realtime events.

Errors

CodeWhen
DISCUSSION_NOT_FOUNDNo discussion exists with the given id.
FORBIDDENThe caller isn’t the creator or a project OWNER, is VIEW_ONLY/COMMENT_ONLY, or the project is archived.
UNAUTHENTICATEDNo valid token was supplied.

Discussion type

The fields available on a Discussion. The comment thread itself is loaded separately via commentList(category: DISCUSSION) — the Discussion.comments field is deprecated and should not be used.

FieldTypeDescription
idID!The discussion id.
titleString!The thread title (the only editable field).
descriptionStringA short clipped preview of the body (HTML truncated to ~180 characters), useful for list views.
htmlString!The opening message as sanitized HTML. Immutable after creation.
textString!The opening message as plain text.
createdAtDateTime!When the thread was created.
updatedAtDateTime!When the thread was last changed (e.g. renamed).
userUser!The creator of the thread.
people[User!]Users participating in the thread (creator plus commenters).
projectProject!The workspace the discussion belongs to.
commentCountInt!The number of comments in the thread.
isReadBooleanWhether the calling user has read the thread.
isSeenBooleanWhether the calling user has seen (surfaced but not necessarily opened) the thread.

Permissions

All three mutations require the caller to be a member of the discussion’s workspace, and they deny VIEW_ONLY and COMMENT_ONLY access levels. The workspace must be active (not archived).

MutationWho can call it
createDiscussionAny member of the workspace above COMMENT_ONLY (i.e. not VIEW_ONLY/COMMENT_ONLY).
updateDiscussionThe thread’s creator, or a project OWNER.
deleteDiscussionThe thread’s creator, or a project OWNER.