Skip to main content

Documentation Index

Fetch the complete documentation index at: https://www.plain.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Using TypeScript? Check out our GraphQL SDK for a fully typed client.
Opening a discussion attaches a new side-conversation to an existing thread. The type determines where messages are exchanged:
  • SLACK — posts a new Slack thread in a connected Slack channel. Requires slackDetails.connectedSlackChannelId.
  • EMAIL — sends a new email to one or more recipients. Requires emailDetails.toAddresses.
The markdownContent is the first message of the discussion. For Slack discussions you can also pass slackBlocks (a JSON-encoded Slack Block Kit array) to render rich content in Slack; markdownContent remains the fallback rendered in Plain.
Mutation
mutation createThreadDiscussion($input: CreateThreadDiscussionInput!) {
  createThreadDiscussion(input: $input) {
    threadDiscussion {
      id
      threadId
      title
      status
    }
    error {
      message
      type
      code
      fields {
        field
        message
        type
      }
    }
  }
}
Variables
{
  "input": {
    "threadId": "th_01H8H46YPB2S4MAJM382FG9423",
    "type": "SLACK",
    "markdownContent": "Hey team — can someone take a look at this customer's billing issue?",
    "slackDetails": {
      "connectedSlackChannelId": "csc_01HXXXXXXXXXXXXXXXXXXXXXXX"
    }
  }
}