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.
The mutations below change individual attributes on an existing thread. Each one operates on a single field — there is no general-purpose updateThread mutation, so to change multiple attributes you call multiple mutations.
These operations require the following permissions:
Change thread title
mutation updateThreadTitle($input: UpdateThreadTitleInput!) {
updateThreadTitle(input: $input) {
thread {
id
title
}
error {
message
type
code
fields {
field
message
type
}
}
}
}
{
"input": {
"threadId": "th_01H8H46YPB2S4MAJM382FG9423",
"title": "Refund request for order #12345"
}
}
Change thread priority
Priority is an integer from 0 (urgent) to 3 (low).
mutation changeThreadPriority($input: ChangeThreadPriorityInput!) {
changeThreadPriority(input: $input) {
thread {
id
priority
}
error {
message
type
code
fields {
field
message
type
}
}
}
}
{
"input": {
"threadId": "th_01H8H46YPB2S4MAJM382FG9423",
"priority": 0
}
}
Change the thread’s customer
Reassigns the thread to a different customer in your workspace. The original customer keeps any other threads they have.
mutation changeThreadCustomer($input: ChangeThreadCustomerInput!) {
changeThreadCustomer(input: $input) {
thread {
id
customer {
id
fullName
}
}
error {
message
type
code
fields {
field
message
type
}
}
}
}
{
"input": {
"threadId": "th_01H8H46YPB2S4MAJM382FG9423",
"customerId": "c_01H14DFQ4PDYBH398J1E99TWSS"
}
}
Change the thread’s tenant
Move the thread to a different tenant (or pass tenantIdentifier: null to detach the thread from its current tenant).
mutation updateThreadTenant($input: UpdateThreadTenantInput!) {
updateThreadTenant(input: $input) {
thread {
id
tenant {
id
name
}
}
error {
message
type
code
fields {
field
message
type
}
}
}
}
{
"input": {
"threadId": "th_01H8H46YPB2S4MAJM382FG9423",
"tenantIdentifier": {
"externalId": "team_123"
}
}
}
Change the thread’s tier
Move the thread to a different tier (or pass tierIdentifier: null to detach).
mutation updateThreadTier($input: UpdateThreadTierInput!) {
updateThreadTier(input: $input) {
thread {
id
tier {
id
name
}
}
error {
message
type
code
fields {
field
message
type
}
}
}
}
{
"input": {
"threadId": "th_01H8H46YPB2S4MAJM382FG9423",
"tierIdentifier": {
"externalId": "enterprise"
}
}
}