Skip to main content
Using TypeScript? Check out our GraphQL SDK for a fully typed client.
Threads can be in one of 3 statuses:
  • Todo
  • Snoozed
  • Done
When you log into Plain you can filter threads by these statuses. When threads are created they default to Todo. To change a threads status you need an API key with the following permissions:
  • thread:edit
  • thread:read

Mark thread as Done

When any activity happens in a thread, it will move back to Todo. Unlike traditional ticketing software, we expect a ticket to move between Todo and Done a number of times in the course of helping a customer. This will not break or influence any metrics. Done in Plain means “I’m done for now, there is nothing left for me to do”.
Mutation
mutation markThreadAsDone($input: MarkThreadAsDoneInput!) {
  markThreadAsDone(input: $input) {
    thread {
      id
      externalId
      customer {
        id
      }
      status
      statusChangedAt {
        iso8601
        unixTimestamp
      }
      title
      previewText
      priority
    }
    error {
      message
      type
      code
      fields {
        field
        message
        type
      }
    }
  }
}
Variables
{
  "input": {
    "threadId": "th_01H8H46YPB2S4MAJM382FG9423"
  }
}

Snooze thread

You can snooze threads for a duration of time defined in seconds. When any activity happens in a thread, it will be automatically unsnoozed and move to Todo. Otherwise threads will be unsnoozed when the timer runs out.
Mutation
mutation snoozeThread($input: SnoozeThreadInput!) {
  snoozeThread(input: $input) {
    thread {
      id
      externalId
      customer {
        id
      }
      status
      statusChangedAt {
        iso8601
        unixTimestamp
      }
      title
      previewText
      priority
    }
    error {
      message
      type
      code
      fields {
        field
        message
        type
      }
    }
  }
}
Variables
{
  "input": {
    "threadId": "th_01H8H46YPB2S4MAJM382FG9423",
    "durationSeconds": 432000 // 5 days
  }
}

Mark thread as Todo

This is useful if you mistakenly marked a thread as Done or snoozed a thread and want to unsnooze it. Otherwise just write a message or do what you want to do and the thread will be automatically moved back to do Todo.
Mutation
mutation markThreadAsTodo($input: MarkThreadAsTodoInput!) {
  markThreadAsTodo(input: $input) {
    thread {
      id
      externalId
      customer {
        id
      }
      status
      statusChangedAt {
        iso8601
        unixTimestamp
      }
      title
      previewText
      priority
    }
    error {
      message
      type
      code
      fields {
        field
        message
        type
      }
    }
  }
}
Variables
{
  "input": {
    "threadId": "th_01H8H46YPB2S4MAJM382FG9423"
  }
}