Skip to main content
Creating a thread is useful in scenarios where you want to programmatically start a support interaction.
For TypeScript, the GraphQL SDK gives you a fully typed client for these operations.
The two most common cases are a submitted contact form, and proactive outreach after an event or error in your product. A thread is created with an initial ‘message’ composed out of UI components. You have full control over the structure and appearance of the message in Plain. To create a thread you need a customerId. You can get a customer id by creating the customer in Plain first.
If you’re migrating historic threads from another support provider, use importThread instead. It preserves original timestamps and won’t trigger SLAs or autoresponders.
To create a thread, you need an API key with the following permissions:
  • thread:create
  • thread:read
Mutation
Variables