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.
Notes are internal comments that show up in the thread timeline alongside customer messages but are only visible to your team. They’re useful for context — like a heads-up from another teammate, a reminder, or annotations from an automation. Notes can be attached either to a customer (visible across all of that customer’s threads) or specifically to a thread (visible only in that thread’s timeline). These operations require the following permissions:
  • note:create
  • note:edit
  • note:delete

Create a note

text is the plain-text body. If you also pass markdown, that version is preferred where rich text is supported.
Mutation
mutation createNote($input: CreateNoteInput!) {
  createNote(input: $input) {
    note {
      id
      text
      markdown
    }
    error {
      message
      type
      code
      fields {
        field
        message
        type
      }
    }
  }
}
Variables
{
  "input": {
    "customerId": "c_01H14DFQ4PDYBH398J1E99TWSS",
    "threadId": "th_01H8H46YPB2S4MAJM382FG9423",
    "text": "Customer is on the Enterprise plan, will need to loop in their CSM.",
    "markdown": "Customer is on the **Enterprise plan**, will need to loop in their CSM."
  }
}

Update a note

Mutation
mutation updateNote($input: UpdateNoteInput!) {
  updateNote(input: $input) {
    note {
      id
      text
      markdown
    }
    error {
      message
      type
      code
      fields {
        field
        message
        type
      }
    }
  }
}
Variables
{
  "input": {
    "noteId": "no_01HXXXXXXXXXXXXXXXXXXXXXXX",
    "text": "Updated note text.",
    "markdown": "Updated **note** text."
  }
}

Delete a note

Mutation
mutation deleteNote($input: DeleteNoteInput!) {
  deleteNote(input: $input) {
    note {
      id
    }
    error {
      message
      type
      code
      fields {
        field
        message
        type
      }
    }
  }
}
Variables
{
  "input": {
    "noteId": "no_01HXXXXXXXXXXXXXXXXXXXXXXX"
  }
}