> ## Documentation Index
> Fetch the complete documentation index at: https://composio-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Plain

> Plain is a collaborative support platform for B2B support teams, offering a modern, AI-powered interface to consolidate support channels and assist customers efficiently.

![Plain logo](https://mintcdn.com/composio-preview/HvfZXDijhFOaKyF5/images/toolkits/plain.svg?fit=max\&auto=format\&n=HvfZXDijhFOaKyF5\&q=85\&s=8cb865e6f32e0e71ac859ec4a8f180c0)

* **Category:** customer support
* **Auth:** API\_KEY
* **Composio-managed OAuth available?** N/A
* **Tools:** 120
* **Triggers:** 11
* **Slug:** `PLAIN`
* **Version:** 20261101\_00

## Tools

> [accordion] Add Customer To Group
>
> **Slug:** `PLAIN_ADD_CUSTOMER_TO_GROUP`
>
> Add a customer to up to 25 customer groups. Existing memberships are skipped, and the response contains only newly created memberships.
>
> #### Input Parameters
>
> **customerId** `string` *required*
>
> ID of the customer to add to groups.
>
> **customerGroupIdentifiers** `array` *required*
>
> One to 25 customer group identifiers.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Add Customer To Tenants
>
> **Slug:** `PLAIN_ADD_CUSTOMER_TO_TENANTS`
>
> Idempotently add a customer to one or more tenants.
>
> #### Input Parameters
>
> **tenantIdentifiers** `array` *required*
>
> One or more tenants to add or remove.
>
> **customerIdentifier** `object` *required*
>
> Customer whose memberships change.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Add Generated Reply
>
> **Slug:** `PLAIN_ADD_GENERATED_REPLY`
>
> Add a suggested reply for teammate review without sending it to the customer.
>
> #### Input Parameters
>
> **markdown** `string` *required*
>
> Suggested reply in Markdown, at most 5,000 characters.
>
> **threadId** `string` *required*
>
> Thread to add the suggestion to.
>
> **timelineEntryId** `string` *required*
>
> Most recent inbound customer or machine-user message to answer.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Add Labels To Thread
>
> **Slug:** `PLAIN_ADD_LABELS`
>
> Add one or more labels to a thread by label-type ID.
>
> #### Input Parameters
>
> **threadId** `string` *required*
>
> Thread receiving labels.
>
> **labelTypeIds** `array` *required*
>
> Active label-type IDs to add.
>
> **onlyIfNoLabels** `boolean`
>
> Add only when the thread currently has no labels.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Add Members to Tier
>
> **Slug:** `PLAIN_ADD_MEMBERS_TO_TIER`
>
> Add or move up to 25 tenants or companies into one tier.
>
> #### Input Parameters
>
> **tierIdentifier** `object` *required*
>
> Tier receiving the members.
>
> **memberIdentifiers** `array` *required*
>
> Tenants or companies to add or move.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Archive Label Type
>
> **Slug:** `PLAIN_ARCHIVE_LABEL_TYPE`
>
> Archive a label type while preserving labels already on threads.
>
> #### Input Parameters
>
> **labelTypeId** `string` *required*
>
> Label-type ID.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Bulk Delete Thread Fields
>
> **Slug:** `PLAIN_BULK_DELETE_THREAD_FIELDS`
>
> Sequentially delete thread-field values by thread and schema key. Deletions are non-atomic; an interrupted call can leave earlier deletions committed without returning all item results.
>
> #### Input Parameters
>
> **identifiers** `array` *required*
>
> Thread and schema-key pairs whose values should be deleted.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Bulk Set Thread Fields
>
> **Slug:** `PLAIN_BULK_SET_THREAD_FIELDS`
>
> Create or replace multiple typed thread-field values.
>
> #### Input Parameters
>
> **inputs** `array` *required*
>
> One to 25 thread-field values to create or replace.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Change Thread Assignment
>
> **Slug:** `PLAIN_CHANGE_THREAD_ASSIGNMENT`
>
> Assign or unassign a thread's primary assignee, or add or remove additional assignees. For AI-agent assignment, LIVE allows customer replies while SHADOW observes without sending customer replies.
>
> #### Input Parameters
>
> **userIds** `array`
>
> Additional human-user IDs.
>
> **assignee** `object`
>
> Primary user or machine-user assignee for ASSIGN.
>
> **threadId** `string` *required*
>
> Thread to update.
>
> **agentMode** `string ("LIVE" | "SHADOW")`
>
> AI-agent assignment mode. LIVE allows the assigned agent to reply to customers; SHADOW observes real threads but sends no customer replies.
>
> **operation** `string ("ASSIGN" | "UNASSIGN" | "ADD_ADDITIONAL" | "REMOVE_ADDITIONAL")` *required*
>
> Assignment transition to perform.
>
> **machineUserIds** `array`
>
> Additional machine-user IDs.
>
> **onlyIfUnassigned** `boolean`
>
> Assign only when no primary assignee exists.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Create Attachment Download URL
>
> **Slug:** `PLAIN_CREATE_ATTACHMENT_DOWNLOAD_URL`
>
> Create a sensitive three-minute URL and return its virus-scan result. Download or process the file only when attachmentVirusScanResult is CLEAN. Treat INFECTED as unsafe, FAILED or PENDING as not cleared, and null as unscanned; do not fetch or expose the file in any of those states. Do not log or share the URL.
>
> #### Input Parameters
>
> **attachmentId** `string` *required*
>
> Attachment whose temporary URL to create.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Create Attachment Upload Form
>
> **Slug:** `PLAIN_CREATE_ATTACHMENT_UPLOAD_FORM`
>
> Create a sensitive, two-hour presigned upload capability; no file is uploaded. Do not log or share uploadFormUrl or uploadFormData. Next, POST multipart/form-data directly to uploadFormUrl with every uploadFormData key/value as a form field and the exact binary file in the form field named `file`. After that upload succeeds, pass the returned attachment.id to a compatible message or note action.
>
> #### Input Parameters
>
> **fileName** `string` *required*
>
> File name displayed by Plain.
>
> **customerId** `string` *required*
>
> Customer who owns the attachment.
>
> **fileSizeBytes** `integer` *required*
>
> Exact file size in bytes.
>
> **attachmentType** `string ("CHAT" | "CUSTOM_TIMELINE_ENTRY" | "DISCORD" | "EMAIL" | "MS_TEAMS" | "NOTE" | "SLACK" | "THREAD_DISCUSSION")` *required*
>
> Destination channel, which determines Plain's size limit.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Create Autoresponder
>
> **Slug:** `PLAIN_CREATE_AUTORESPONDER`
>
> Create an autoresponder that automatically sends outbound customer replies. Enabled autoresponders can send irreversible external messages when new threads match. Plain permits at most 25 autoresponders per workspace and delays up to 900 seconds.
>
> #### Input Parameters
>
> **name** `string` *required*
>
> Autoresponder name.
>
> **order** `integer` *required*
>
> Priority order from 0 through 99.
>
> **isEnabled** `boolean` *required*
>
> Whether it may fire.
>
> **conditions** `array` *required*
>
> Conditions that must all match.
>
> **textContent** `string` *required*
>
> Plain-text reply body.
>
> **messageSources** `array` *required*
>
> Eligible inbound sources.
>
> **markdownContent** `string`
>
> Markdown reply body.
>
> **responseDelaySeconds** `integer`
>
> Delay before sending, from 0 (immediate) through 900 seconds.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Create Customer Group
>
> **Slug:** `PLAIN_CREATE_CUSTOMER_GROUP`
>
> Creates a new customer group in Plain for organizing and segmenting customers. Customer groups allow you to categorize customers (e.g., by pricing tier, feature access, or support level) and manage them more effectively in your support workflow. Each group has a unique key, display name, and visual color for easy identification. Use this when you need to create a new customer segment for organization or filtering purposes.
>
> #### Input Parameters
>
> **key** `string` *required*
>
> Unique identifier key for the customer group. Must be unique across all customer groups in your workspace. Use lowercase with underscores (e.g., 'vip\_customers').
>
> **name** `string` *required*
>
> Display name of the customer group (e.g., 'VIP Customers', 'Free Tier'). Used for organization and display purposes.
>
> **color** `string` *required*
>
> Hex color code for the group (e.g., #FF5733). Must be a valid 6-digit hex color starting with #.
>
> **externalId** `string`
>
> Optional external ID to link this customer group with an identifier from your system (e.g., Stripe plan ID, internal database ID).
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Create Email/Slack Discussion
>
> **Slug:** `PLAIN_CREATE_DISCUSSION`
>
> Immediately and irreversibly start an external EMAIL or SLACK discussion. EMAIL delivers the first message to every emailDetails.toAddresses recipient and optional ccAddresses recipient. SLACK posts it to the connected channel selected by slackDetails.connectedSlackChannelId. Live provider authorization requires threadDiscussion:create, although the current operation page omits it.
>
> #### Input Parameters
>
> **type** `string ("EMAIL" | "SLACK")` *required*
>
> Public discussion channel to use.
>
> **threadId** `string` *required*
>
> Thread to attach the side-conversation to.
>
> **emailDetails** `object`
>
> Required only for EMAIL discussions.
>
> **slackDetails** `object`
>
> Required only for SLACK discussions.
>
> **attachmentIds** `array`
>
> Previously uploaded THREAD\_DISCUSSION attachment IDs.
>
> **markdownContent** `string` *required*
>
> First discussion message in Markdown.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Create Customer Or Thread Event
>
> **Slug:** `PLAIN_CREATE_EVENT`
>
> Create a custom customer-wide or single-thread timeline event.
>
> #### Input Parameters
>
> **title** `string` *required*
>
> Event title.
>
> **target** `string ("CUSTOMER" | "THREAD")` *required*
>
> Event owner type.
>
> **threadId** `string`
>
> Thread ID for THREAD.
>
> **timestamp** `string`
>
> Optional backfilled ISO 8601 event timestamp.
>
> **components** `array` *required*
>
> Timeline event components.
>
> **externalId** `string`
>
> Unique event external ID.
>
> **isCollapsed** `boolean`
>
> Render collapsed by default.
>
> **customerIdentifier** `object`
>
> Customer selector for CUSTOMER.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Create Label Type
>
> **Slug:** `PLAIN_CREATE_LABEL_TYPE`
>
> Create a label type that can be applied to threads.
>
> #### Input Parameters
>
> **icon** `string`
>
> Label icon.
>
> **name** `string` *required*
>
> Label-type name.
>
> **type** `string ("DEFAULT" | "TEAM")`
>
> Workspace-wide or team-scoped type.
>
> **color** `string`
>
> Label color.
>
> **externalId** `string`
>
> Unique external ID.
>
> **description** `string`
>
> Label-type description.
>
> **isExcludedFromAi** `boolean`
>
> Exclude from AI suggestions.
>
> **parentLabelTypeId** `string`
>
> Parent label-type ID.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Create Note
>
> **Slug:** `PLAIN_CREATE_NOTE`
>
> Create an internal note on an existing customer thread. Plain's live API currently rejects customer-level notes without threadId even though the current GraphQL SDL marks that input nullable.
>
> #### Input Parameters
>
> **text** `string` *required*
>
> Plain-text internal note body.
>
> **markdown** `string`
>
> Optional Markdown version of the note body.
>
> **threadId** `string` *required*
>
> Thread whose timeline receives the note. The live API requires threadId even though the current GraphQL SDL marks it nullable.
>
> **customerId** `string` *required*
>
> Customer who owns the thread receiving the note.
>
> **attachmentIds** `array`
>
> IDs of previously uploaded NOTE attachments, at most 100.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Create Tier SLA
>
> **Slug:** `PLAIN_CREATE_SERVICE_LEVEL_AGREEMENT`
>
> Create one legacy tier SLA; next-response requires a first-response SLA on the tier.
>
> #### Input Parameters
>
> **tierId** `string` *required*
>
> Tier that will inherit this SLA.
>
> **serviceLevelAgreement** `object` *required*
>
> SLA target and applicability configuration.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Create SLA Policy
>
> **Slug:** `PLAIN_CREATE_SERVICE_LEVEL_AGREEMENT_POLICY`
>
> Create a named SLA policy with zero or more unique target types.
>
> #### Input Parameters
>
> **name** `string` *required*
>
> Policy display name.
>
> **targets** `array` *required*
>
> Unique SLA targets for the policy.
>
> **description** `string`
>
> Optional policy description.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Create Snippet
>
> **Slug:** `PLAIN_CREATE_SNIPPET`
>
> Create a reusable plain-text and optional Markdown reply snippet.
>
> #### Input Parameters
>
> **name** `string` *required*
>
> Searchable snippet name.
>
> **path** `string`
>
> Optional alphanumeric folder path in the Plain app.
>
> **text** `string` *required*
>
> Plain-text snippet body.
>
> **markdown** `string`
>
> Optional rich Markdown version of the snippet body.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Create Task
>
> **Slug:** `PLAIN_CREATE_TASK`
>
> Create a task with optional company, tenant or account context and an optional assignee. Tenant and account IDs may be supplied together; a company ID cannot be combined with either.
>
> #### Input Parameters
>
> **title** `string` *required*
>
> Task title.
>
> **status** `string ("TODO" | "IN_PROGRESS" | "DONE" | "CANCELLED")`
>
> Initial task lifecycle status.
>
> **priority** `integer`
>
> Priority from 0 (highest) to 3 (lowest).
>
> **tenantId** `string`
>
> Optional parent tenant ID. On update, setting this clears any existing company parent; omitting it leaves the current parent unchanged.
>
> **accountId** `string`
>
> Optional parent account ID.
>
> **companyId** `string`
>
> Optional parent company ID. On update, setting this clears any existing tenant parent; omitting it leaves the current parent unchanged.
>
> **assignedTo** `object`
>
> Optional user or machine-user assignee.
>
> **description** `string`
>
> Optional task details or instructions.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Create Thread
>
> **Slug:** `PLAIN_CREATE_THREAD`
>
> Create a thread after obtaining a valid customer identifier. Creating a thread can trigger a configured autoresponder, which sends an external reply to the customer; that outbound message cannot be recalled.
>
> #### Input Parameters
>
> **title** `string`
>
> Optional title of the new thread
>
> **channel** `string ("EMAIL" | "SLACK" | "CHAT" | "API" | "MS_TEAMS" | "DISCORD" | "IMPORT" | "INTERNAL")`
>
> Thread channel; defaults to API. SLACK and MS\_TEAMS require matching channelDetails
>
> **priority** `integer`
>
> Optional priority from 0 (most urgent) to 3 (least urgent); defaults to 2
>
> **assignedTo** `object`
>
> Optional human-user or machine-user assignment for the thread
>
> **components** `array`
>
> Optional list of content components for the thread
>
> **externalId** `string`
>
> Optional unique thread identifier from your own system
>
> **description** `string`
>
> Optional thread preview description; Plain infers it when omitted
>
> **labelTypeIds** `array`
>
> Optional list of label type IDs to assign
>
> **threadFields** `array`
>
> Optional typed thread-field values to set on the new thread
>
> **attachmentIds** `array`
>
> Deprecated attachment IDs for the first timeline entry; prefer channel-specific send actions
>
> **channelDetails** `object`
>
> Channel details required for SLACK or MS\_TEAMS threads
>
> **tenantIdentifier** `object`
>
> Optional exact-one identifier for the tenant assigned to the thread
>
> **accountIdentifier** `object`
>
> Optional exact-one account identifier assigned to the thread
>
> **customerIdentifier** `object` *required*
>
> Identifier object for the customer
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Create Thread Field Schema
>
> **Slug:** `PLAIN_CREATE_THREAD_FIELD_SCHEMA`
>
> Create a custom thread-field schema.
>
> #### Input Parameters
>
> **key** `string` *required*
>
> Immutable lowercase field key.
>
> **type** `string ("STRING" | "BOOL" | "ENUM" | "NUMBER" | "CURRENCY" | "DATE")` *required*
>
> Stored field type.
>
> **label** `string` *required*
>
> Unique human-readable field name.
>
> **order** `integer` *required*
>
> Display order.
>
> **enumValues** `array` *required*
>
> Allowed ENUM values; empty otherwise.
>
> **isRequired** `boolean` *required*
>
> Whether Done requires a value.
>
> **description** `string` *required*
>
> Field description.
>
> **defaultDateValue** `string`
>
> Default DATE value in ISO 8601 format.
>
> **isClientReadonly** `boolean`
>
> Restrict writes to the API.
>
> **defaultNumberValue** `number`
>
> Default NUMBER or CURRENCY value.
>
> **defaultStringValue** `string`
>
> Default STRING or ENUM value.
>
> **defaultBooleanValue** `boolean`
>
> Default BOOL value.
>
> **isAiAutoFillEnabled** `boolean` *required*
>
> Allow AI auto-fill.
>
> **isAvailableToAgents** `boolean`
>
> Expose as agent context.
>
> **dependsOnThreadField** `object`
>
> Conditional parent field.
>
> **dependsOnLabelTypeIds** `array`
>
> Labels that reveal this field.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Create Tier
>
> **Slug:** `PLAIN_CREATE_TIER`
>
> Create a support tier, optionally assigning tenant or company members.
>
> #### Input Parameters
>
> **name** `string` *required*
>
> Tier display name.
>
> **color** `string` *required*
>
> Six-digit hexadecimal tier color.
>
> **isDefault** `boolean`
>
> Whether unmatched threads use this tier.
>
> **externalId** `string` *required*
>
> Unique external tier ID.
>
> **memberIdentifiers** `array`
>
> Initial tenant and company members, up to 25.
>
> **defaultThreadPriority** `integer`
>
> Default thread priority from 0 (urgent) to 3 (low).
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Delete Autoresponder
>
> **Slug:** `PLAIN_DELETE_AUTORESPONDER`
>
> Permanently delete a native autoresponder.
>
> #### Input Parameters
>
> **autoresponderId** `string` *required*
>
> Native autoresponder ID.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Delete Customer
>
> **Slug:** `PLAIN_DELETE_CUSTOMER`
>
> Permanently and irreversibly deletes a Plain customer by ID, including all associated threads, timeline entries, and other customer data. Deletion runs asynchronously. Confirm the destructive operation before calling.
>
> #### Input Parameters
>
> **customer\_id** `string` *required*
>
> Unique identifier of the customer to delete, as returned by the Plain API.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Delete Customer Group
>
> **Slug:** `PLAIN_DELETE_CUSTOMER_GROUP`
>
> Permanently delete an empty customer group after confirmation.
>
> #### Input Parameters
>
> **customerGroupId** `string` *required*
>
> Plain ID of the customer group to delete.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Delete Note
>
> **Slug:** `PLAIN_DELETE_NOTE`
>
> Soft-delete an internal note.
>
> #### Input Parameters
>
> **noteId** `string` *required*
>
> Note to soft-delete.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Delete Tier SLA
>
> **Slug:** `PLAIN_DELETE_SERVICE_LEVEL_AGREEMENT`
>
> Delete a legacy SLA from a tier. A first-response SLA cannot be deleted while the tier still has a next-response SLA; delete the next-response SLA first.
>
> #### Input Parameters
>
> **serviceLevelAgreementId** `string` *required*
>
> Plain ID of the legacy SLA to delete.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Delete SLA Policy
>
> **Slug:** `PLAIN_DELETE_SERVICE_LEVEL_AGREEMENT_POLICY`
>
> Delete an SLA policy, its targets, and their trackers. Threads using the deleted policy fall back to their tier's SLAs.
>
> #### Input Parameters
>
> **serviceLevelAgreementPolicyId** `string` *required*
>
> Plain SLA policy ID to delete.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Delete Snippet
>
> **Slug:** `PLAIN_DELETE_SNIPPET`
>
> Soft-delete a snippet while preserving historical references.
>
> #### Input Parameters
>
> **snippetId** `string` *required*
>
> Snippet to soft-delete.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Delete Task
>
> **Slug:** `PLAIN_DELETE_TASK`
>
> Soft-delete a task and remove its thread links.
>
> #### Input Parameters
>
> **taskId** `string` *required*
>
> Plain task ID to soft-delete.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Delete Tenant
>
> **Slug:** `PLAIN_DELETE_TENANT`
>
> Delete a tenant, unlink its customers, and remove its field values. Existing threads retain a reference to the tenant deletion record but are no longer routed through that tenant.
>
> #### Input Parameters
>
> **tenantIdentifier** `object` *required*
>
> Tenant to delete. The operation unlinks its customers and removes its field values; existing threads retain a deletion-record reference but are no longer routed through the tenant.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Delete Tenant Field Value
>
> **Slug:** `PLAIN_DELETE_TENANT_FIELD`
>
> Clear one tenant field value without deleting its schema.
>
> #### Input Parameters
>
> **tenantFieldId** `string` *required*
>
> Plain ID of the tenant-field value to clear.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Delete Tenant Field Schema
>
> **Slug:** `PLAIN_DELETE_TENANT_FIELD_SCHEMA`
>
> Permanently delete a tenant-field schema and all values stored against it.
>
> #### Input Parameters
>
> **tenantFieldSchemaId** `string` *required*
>
> Plain ID of the tenant-field schema to permanently delete.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Delete Thread
>
> **Slug:** `PLAIN_DELETE_THREAD`
>
> Permanently delete a thread and all associated data.
>
> #### Input Parameters
>
> **threadId** `string` *required*
>
> Plain thread ID.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Delete Thread Field Schema
>
> **Slug:** `PLAIN_DELETE_THREAD_FIELD_SCHEMA`
>
> Delete a schema and all values stored against it.
>
> #### Input Parameters
>
> **threadFieldSchemaId** `string` *required*
>
> Thread-field schema ID.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Delete Tier
>
> **Slug:** `PLAIN_DELETE_TIER`
>
> Permanently delete a tier and all of its memberships. The live API also requires serviceLevelAgreementBreachAction:delete, including when the tier does not exist. Plain's API-key UI grantability for that permission is currently unknown.
>
> #### Input Parameters
>
> **tierId** `string` *required*
>
> Plain tier ID to permanently delete.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Delete User
>
> **Slug:** `PLAIN_DELETE_USER`
>
> Permanently removes a Plain workspace user by ID. Their threads remain but become unassigned. Plain rejects deletion when the user is the workspace's only owner, so assign another owner first. Confirm this destructive operation.
>
> #### Input Parameters
>
> **user\_id** `string` *required*
>
> Unique identifier of the user to delete, as returned by the Plain API.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Escalate Thread Or Select Path
>
> **Slug:** `PLAIN_ESCALATE_OR_SELECT_PATH`
>
> Advance a thread's escalation or attach/detach its escalation path.
>
> #### Input Parameters
>
> **threadId** `string` *required*
>
> Thread to update.
>
> **detachPath** `boolean`
>
> Detach the current escalation path.
>
> **escalationPathId** `string`
>
> Path to attach; omit for an immediate escalation.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Fetch Company
>
> **Slug:** `PLAIN_FETCH_COMPANY`
>
> Tool to fetch company details by ID. Use when you need the full profile of a company, including name, domain, contract value, owner info, and timestamps.
>
> #### Input Parameters
>
> **company\_id** `string` *required*
>
> Plain's internal ID of the company to fetch, e.g., 'cmp\_01H1P4TE62AS5KZ4CZFC0578ED'.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Fetch Issues
>
> **Slug:** `PLAIN_FETCH_ISSUES`
>
> Fetches external issue tracker links (Jira, Linear, GitHub, etc.) associated with a customer's threads. Returns a bounded, flattened snapshot of issue links across the customer's threads, including thread context. With defaults, it examines up to 50 threads and 50 links per thread; results may be truncated at either limit.
>
> #### Input Parameters
>
> **linkFirst** `integer`
>
> Maximum number of issue links to fetch per thread. Must be between 1-100. Defaults to 50.
>
> **customerId** `string` *required*
>
> The unique identifier of the customer whose external issue tracker links (Jira, Linear, etc.) are to be retrieved.
>
> **threadFirst** `integer`
>
> Maximum number of customer threads to fetch. Must be between 1-100. Defaults to 50.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Fetch Tier
>
> **Slug:** `PLAIN_FETCH_TIER`
>
> Fetch a tier by ID. Set include\_details=true to include memberships and SLA configuration, which require additional permissions.
>
> #### Input Parameters
>
> **tier\_id** `string` *required*
>
> The unique identifier of the tier to fetch (e.g., 'tier\_123')
>
> **include\_details** `boolean`
>
> Whether to include memberships and detailed SLA configuration. Defaults to false so an ordinary tier read only requires tier:read.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Autoresponder
>
> **Slug:** `PLAIN_GET_AUTORESPONDER`
>
> Fetch a native Plain autoresponder by ID through a machine-user-safe list query. Returns no result when the list is exhausted without a match; fails if pagination cannot be exhausted within 25 pages.
>
> #### Input Parameters
>
> **autoresponderId** `string` *required*
>
> Native autoresponder ID.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Customer By Email
>
> **Slug:** `PLAIN_GET_CUSTOMER_BY_EMAIL`
>
> Fetch customer details by email address. Returns customer information if found, or null if no customer exists with that email.
>
> #### Input Parameters
>
> **email** `string` *required*
>
> Email address of the customer to fetch
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Customer By External ID
>
> **Slug:** `PLAIN_GET_CUSTOMER_BY_EXTERNAL_ID`
>
> Fetch a customer by the exact stable external ID from your own system.
>
> #### Input Parameters
>
> **externalId** `string` *required*
>
> Exact customer external ID to retrieve.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Customer By ID
>
> **Slug:** `PLAIN_GET_CUSTOMER_BY_ID`
>
> Retrieve a customer's ID, full name, email address, and creation and update timestamps by customer ID.
>
> #### Input Parameters
>
> **id** `string` *required*
>
> The unique identifier of the customer to retrieve.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Customer Group
>
> **Slug:** `PLAIN_GET_CUSTOMER_GROUP`
>
> Fetch one customer group by its Plain ID. Plain's live API requires customerGroup:read for this query.
>
> #### Input Parameters
>
> **customerGroupId** `string` *required*
>
> Plain ID of the customer group to retrieve.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Customers
>
> **Slug:** `PLAIN_GET_CUSTOMERS`
>
> Tool to fetch a list of customers. Use when retrieving multiple customer records with pagination, filtering, or sorting.
>
> #### Input Parameters
>
> **last** `integer`
>
> Number of customers to fetch before the 'before' cursor. Must be ≥ 1.
>
> **after** `string`
>
> Cursor for forward pagination. Use with 'first'.
>
> **first** `integer`
>
> Number of customers to fetch after the 'after' cursor. Must be ≥ 1.
>
> **before** `string`
>
> Cursor for backward pagination. Use with 'last'.
>
> **sortBy** `object`
>
> Sorting instructions for the customers list.
>
> **filters** `object`
>
> Filters to apply when fetching customers.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Email/Slack Discussion
>
> **Slug:** `PLAIN_GET_DISCUSSION`
>
> Fetch metadata for one EMAIL or SLACK side-conversation by ID. Live provider authorization requires threadDiscussion:read, although the current public operation page does not state that permission.
>
> #### Input Parameters
>
> **discussionId** `string` *required*
>
> EMAIL or SLACK side-conversation ID to fetch.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Knowledge Gap
>
> **Slug:** `PLAIN_GET_KNOWLEDGE_GAP`
>
> Fetch one AI-detected knowledge gap and its linked task and signals.
>
> #### Input Parameters
>
> **knowledgeGapId** `string` *required*
>
> Plain knowledge-gap ID.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Label Type
>
> **Slug:** `PLAIN_GET_LABEL_TYPE`
>
> Fetch one label type by Plain ID or external ID.
>
> #### Input Parameters
>
> **externalId** `string`
>
> Label-type external ID.
>
> **labelTypeId** `string`
>
> Plain label-type ID.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get SLA Policy
>
> **Slug:** `PLAIN_GET_SERVICE_LEVEL_AGREEMENT_POLICY`
>
> Fetch one SLA policy by its Plain ID.
>
> #### Input Parameters
>
> **serviceLevelAgreementPolicyId** `string` *required*
>
> Plain SLA policy ID.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Snippet
>
> **Slug:** `PLAIN_GET_SNIPPET`
>
> Fetch one snippet by ID, including a soft-deleted snippet.
>
> #### Input Parameters
>
> **snippetId** `string` *required*
>
> Snippet ID to fetch.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Task by ID or Ref
>
> **Slug:** `PLAIN_GET_TASK`
>
> Fetch one task by either its Plain ID or human-readable T-123 ref.
>
> #### Input Parameters
>
> **ref** `string`
>
> Human-readable task ref such as T-123.
>
> **taskId** `string`
>
> Plain task ID.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Tenant
>
> **Slug:** `PLAIN_GET_TENANT`
>
> Fetch one tenant by its Plain ID, including current custom field values.
>
> #### Input Parameters
>
> **tenantId** `string` *required*
>
> Plain ID of the tenant to retrieve.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Thread By ID
>
> **Slug:** `PLAIN_GET_THREAD_BY_ID`
>
> Fetch a thread by ID, including customer info, status, priority, labels, and assignments. If not found, the thread field in the GraphQL response is null.
>
> #### Input Parameters
>
> **id** `string` *required*
>
> Unique thread identifier in format: prefix\_26chars (e.g., th\_01ABC...). Use LIST\_THREADS or CREATE\_THREAD to obtain valid IDs.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Thread By Reference
>
> **Slug:** `PLAIN_GET_THREAD_BY_REFERENCE`
>
> Fetch a thread by ref or by its customer-scoped external ID.
>
> #### Input Parameters
>
> **ref** `string`
>
> Human-readable thread ref.
>
> **customerId** `string`
>
> Customer ID that scopes an external-ID lookup.
>
> **externalId** `string`
>
> Thread external ID.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get User By ID
>
> **Slug:** `PLAIN_GET_USER_BY_ID`
>
> Fetch workspace user/team member by ID. Returns detailed information about a workspace team member including their name, email, status, and avatar. Note: This fetches workspace users (team members), not customers. Use GET\_CUSTOMER\_BY\_ID for customer data.
>
> #### Input Parameters
>
> **user\_id** `string` *required*
>
> Unique identifier of the workspace user/team member to fetch (format: u\_XXXXXX)
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Import Thread
>
> **Slug:** `PLAIN_IMPORT_THREAD`
>
> Import one historical thread without triggering SLAs or autoresponders.
>
> #### Input Parameters
>
> **title** `string` *required*
>
> Original thread title.
>
> **status** `string ("TODO" | "SNOOZED" | "DONE")` *required*
>
> Imported thread status.
>
> **priority** `integer` *required*
>
> Priority from 0 through 3.
>
> **tenantId** `string`
>
> Tenant ID; customer must be a member.
>
> **createdAt** `string` *required*
>
> Original ISO 8601 creation time.
>
> **assignedTo** `object`
>
> Initial user or machine-user assignee.
>
> **externalId** `string` *required*
>
> Idempotent source-system thread ID.
>
> **description** `string`
>
> Thread description.
>
> **externalUrl** `string`
>
> Source-system thread URL.
>
> **labelTypeIds** `array`
>
> Initial label-type IDs.
>
> **statusDetail** `object` *required*
>
> Status-compatible detail.
>
> **customerIdentifier** `object` *required*
>
> Existing customer selector.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Import Thread Messages
>
> **Slug:** `PLAIN_IMPORT_THREAD_MESSAGES`
>
> Import up to 25 historical messages and return one result per input message. Reusing a message externalId is idempotent and returns NOOP. The batch is non-atomic: successful messages remain committed when others fail, with per-message results and a top-level bulk\_partial\_failure error. Attachments require previously uploaded IDs.
>
> #### Input Parameters
>
> **threadId** `string` *required*
>
> Destination thread ID.
>
> **threadMessages** `array` *required*
>
> One to 25 historical messages.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List AI Feedback
>
> **Slug:** `PLAIN_LIST_AI_FEEDBACK`
>
> List feedback submitted on Plain AI features, optionally filtered by feature, sentiment, or time.
>
> #### Input Parameters
>
> **last** `integer`
>
> Number of records to return moving backward.
>
> **after** `string`
>
> Cursor after which to return records. Use with first.
>
> **first** `integer`
>
> Number of records to return moving forward.
>
> **before** `string`
>
> Cursor before which to return records. Use with last.
>
> **filters** `object`
>
> Optional AI feedback filters.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Autoresponders
>
> **Slug:** `PLAIN_LIST_AUTORESPONDERS`
>
> List native Plain autoresponders in priority order.
>
> #### Input Parameters
>
> **last** `integer`
>
> Number of records to return moving backward.
>
> **after** `string`
>
> Cursor after which to return records. Use with first.
>
> **first** `integer`
>
> Number of records to return moving forward.
>
> **before** `string`
>
> Cursor before which to return records. Use with last.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Customer Groups
>
> **Slug:** `PLAIN_LIST_CUSTOMER_GROUPS`
>
> List one paginated page of customer groups with optional external-ID filtering.
>
> #### Input Parameters
>
> **last** `integer`
>
> Number of groups to fetch before the 'before' cursor, from 1 to 100.
>
> **after** `string`
>
> Cursor for forward pagination. Use with 'first'.
>
> **first** `integer`
>
> Number of groups to fetch after the 'after' cursor, from 1 to 100.
>
> **before** `string`
>
> Cursor for backward pagination. Use with 'last'.
>
> **filters** `object`
>
> Filters to apply when fetching customer groups.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Deleted Threads
>
> **Slug:** `PLAIN_LIST_DELETED_THREADS`
>
> List deletion-audit records for threads.
>
> #### Input Parameters
>
> **last** `integer`
>
> Number of records to return moving backward.
>
> **after** `string`
>
> Cursor after which to return records. Use with first.
>
> **first** `integer`
>
> Number of records to return moving forward.
>
> **before** `string`
>
> Cursor before which to return records. Use with last.
>
> **deletedAt** `object`
>
> Deletion-time range.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Email/Slack Discussions
>
> **Slug:** `PLAIN_LIST_DISCUSSIONS`
>
> List only EMAIL and SLACK side-conversations with filters and pagination. Live provider authorization requires threadDiscussion:read, although the current public operation page does not state that permission.
>
> #### Input Parameters
>
> **last** `integer`
>
> Number of records to return moving backward.
>
> **after** `string`
>
> Cursor after which to return records. Use with first.
>
> **first** `integer`
>
> Number of records to return moving forward.
>
> **before** `string`
>
> Cursor before which to return records. Use with last.
>
> **sortBy** `object`
>
> Optional discussion ordering.
>
> **filters** `object`
>
> EMAIL/SLACK discussion filters; channel types default to both.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Generated Replies
>
> **Slug:** `PLAIN_LIST_GENERATED_REPLIES`
>
> List current suggested replies for a thread's most recent inbound message.
>
> #### Input Parameters
>
> **threadId** `string` *required*
>
> Thread whose current suggestions to return.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Knowledge Gaps
>
> **Slug:** `PLAIN_LIST_KNOWLEDGE_GAPS`
>
> List AI-detected knowledge gaps with status filters and useful sort orders.
>
> #### Input Parameters
>
> **last** `integer`
>
> Number of records to return moving backward.
>
> **after** `string`
>
> Cursor after which to return records. Use with first.
>
> **first** `integer`
>
> Number of records to return moving forward.
>
> **before** `string`
>
> Cursor before which to return records. Use with last.
>
> **sortBy** `object`
>
> Optional knowledge-gap sort order.
>
> **filters** `object`
>
> Optional knowledge-gap filters.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Label Types
>
> **Slug:** `PLAIN_LIST_LABEL_TYPES`
>
> List active and/or archived label types.
>
> #### Input Parameters
>
> **last** `integer`
>
> Number of records to return moving backward.
>
> **after** `string`
>
> Cursor after which to return records. Use with first.
>
> **first** `integer`
>
> Number of records to return moving forward.
>
> **before** `string`
>
> Cursor before which to return records. Use with last.
>
> **isArchived** `boolean`
>
> Filter by archived state.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List SLA Policies
>
> **Slug:** `PLAIN_LIST_SERVICE_LEVEL_AGREEMENT_POLICIES`
>
> List named SLA policies, optionally filtering by name or target type.
>
> #### Input Parameters
>
> **last** `integer`
>
> Number of records to return moving backward.
>
> **after** `string`
>
> Cursor after which to return records. Use with first.
>
> **first** `integer`
>
> Number of records to return moving forward.
>
> **before** `string`
>
> Cursor before which to return records. Use with last.
>
> **filters** `object`
>
> Optional policy filters.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Snippets
>
> **Slug:** `PLAIN_LIST_SNIPPETS`
>
> List the workspace snippet library with cursor pagination.
>
> #### Input Parameters
>
> **last** `integer`
>
> Number of records to return moving backward.
>
> **after** `string`
>
> Cursor after which to return records. Use with first.
>
> **first** `integer`
>
> Number of records to return moving forward.
>
> **before** `string`
>
> Cursor before which to return records. Use with last.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Tasks
>
> **Slug:** `PLAIN_LIST_TASKS`
>
> List workspace tasks with pagination, filtering, and sorting.
>
> #### Input Parameters
>
> **last** `integer`
>
> Number of records to return moving backward.
>
> **after** `string`
>
> Cursor after which to return records. Use with first.
>
> **first** `integer`
>
> Number of records to return moving forward.
>
> **before** `string`
>
> Cursor before which to return records. Use with last.
>
> **sortBy** `object`
>
> Optional task sort order.
>
> **filters** `object`
>
> Optional task filters.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Tenant Field Schemas
>
> **Slug:** `PLAIN_LIST_TENANT_FIELD_SCHEMAS`
>
> List tenant-field schemas before reading or writing custom values.
>
> #### Input Parameters
>
> **last** `integer`
>
> Number of records to return moving backward.
>
> **after** `string`
>
> Cursor after which to return records. Use with first.
>
> **first** `integer`
>
> Number of records to return moving forward.
>
> **before** `string`
>
> Cursor before which to return records. Use with last.
>
> **filters** `object`
>
> Optional tenant-field schema filters.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Tenants
>
> **Slug:** `PLAIN_LIST_TENANTS`
>
> List tenants with current filters and cursor pagination.
>
> #### Input Parameters
>
> **last** `integer`
>
> Number of records to return moving backward.
>
> **after** `string`
>
> Cursor after which to return records. Use with first.
>
> **first** `integer`
>
> Number of records to return moving forward.
>
> **before** `string`
>
> Cursor before which to return records. Use with last.
>
> **filters** `object`
>
> Optional tenant filters.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Thread Field Schemas
>
> **Slug:** `PLAIN_LIST_THREAD_FIELD_SCHEMAS`
>
> List the workspace's custom thread-field schemas.
>
> #### Input Parameters
>
> **last** `integer`
>
> Number of records to return moving backward.
>
> **after** `string`
>
> Cursor after which to return records. Use with first.
>
> **first** `integer`
>
> Number of records to return moving forward.
>
> **before** `string`
>
> Cursor before which to return records. Use with last.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Threads (Deprecated)
>
> **Slug:** `PLAIN_LIST_THREADS`
>
> DEPRECATED: Use PLAIN\_PLAIN\_QUERY\_THREADS instead. Lists one page of threads (support conversations) in Plain. Returns thread summaries including ID, reference, title, status, and priority. Use this action to: - Get an overview of a page of threads in the system - Fetch threads with pagination for large datasets - Find threads by browsing through the list Pagination: Use 'first' for forward pagination (newest first) or 'last' for backward pagination (oldest last). For paginated results, use the cursors from pageInfo (endCursor/startCursor) with 'after'/'before' parameters. If no pagination parameters are provided, returns the provider's default first page.
>
> #### Input Parameters
>
> **last** `integer`
>
> Number of threads to fetch in backward direction, at most 100. Use for fetching the last N threads or N threads before 'before' cursor. Cannot be used with 'first'.
>
> **after** `string`
>
> Cursor for forward pagination. Get threads after this cursor. Use with 'first'. Obtain from pageInfo.endCursor of previous response.
>
> **first** `integer`
>
> Number of threads to fetch in forward direction, at most 100. Use for fetching the first N threads or N threads after 'after' cursor. Cannot be used with 'last'.
>
> **before** `string`
>
> Cursor for backward pagination. Get threads before this cursor. Use with 'last'. Obtain from pageInfo.startCursor of previous response.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Threads By External ID
>
> **Slug:** `PLAIN_LIST_THREADS_BY_EXTERNAL_ID`
>
> List a page of threads with an external ID across all customers.
>
> #### Input Parameters
>
> **last** `integer`
>
> Number of records to return moving backward.
>
> **after** `string`
>
> Cursor after which to return records. Use with first.
>
> **first** `integer`
>
> Number of records to return moving forward.
>
> **before** `string`
>
> Cursor before which to return records. Use with last.
>
> **externalId** `string` *required*
>
> Shared thread external ID.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Threads With Rich Filters
>
> **Slug:** `PLAIN_LIST_THREADS_RICH`
>
> List threads with the provider's complete public filter and sort surface.
>
> #### Input Parameters
>
> **last** `integer`
>
> Number of records to return moving backward.
>
> **after** `string`
>
> Cursor after which to return records. Use with first.
>
> **first** `integer`
>
> Number of records to return moving forward.
>
> **before** `string`
>
> Cursor before which to return records. Use with last.
>
> **sortBy** `object`
>
> Thread sort order.
>
> **filters** `object`
>
> Rich thread filters.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Tiers
>
> **Slug:** `PLAIN_LIST_TIERS`
>
> List tiers with cursor pagination. Set include\_details=true to include memberships and SLA configuration, which require additional permissions.
>
> #### Input Parameters
>
> **last** `integer`
>
> Number of items to fetch in backward pagination, from 1 to 100.
>
> **after** `string`
>
> Cursor for forward pagination, used together with 'first'.
>
> **first** `integer`
>
> Number of items to fetch in forward pagination, from 1 to 100.
>
> **before** `string`
>
> Cursor for backward pagination, used together with 'last'.
>
> **include\_details** `boolean`
>
> Whether each tier includes memberships and detailed SLA configuration. Defaults to false so ordinary tier reads only require tier:read.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Mark Customer As Spam
>
> **Slug:** `PLAIN_MARK_CUSTOMER_AS_SPAM`
>
> Idempotently hide a customer's threads as spam and exclude them from metrics.
>
> #### Input Parameters
>
> **customerId** `string` *required*
>
> Plain ID of the customer whose spam status changes.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Threads
>
> **Slug:** `PLAIN_QUERY_THREADS`
>
> Retrieve up to 50 threads from one page, optionally filtered by status. Omit the cursor for the first page and pass the returned end cursor to fetch the next page.
>
> #### Input Parameters
>
> **cursor** `string`
>
> Cursor for pagination returned by a previous call. Omit for first page. Use the cursor from each response to fetch the next page; omitting it resets to the first page.
>
> **statuses** `array`
>
> Filter threads by status. Supported values: TODO, SNOOZED, DONE.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Remove Customer From Group
>
> **Slug:** `PLAIN_REMOVE_CUSTOMER_FROM_GROUP`
>
> Removes a customer from one or more customer groups in Plain. Use this action to revoke customer group memberships. The customer must be a member of the specified group(s) - attempting to remove a customer from a group they're not in will result in an error. Groups can be identified by their Plain internal ID (customerGroupId), unique key (customerGroupKey), or external ID (externalId). Common use cases: - Downgrade customer tier (e.g., remove from premium\_tier group) - Remove customer from beta access groups - Clean up group memberships after customer status changes
>
> #### Input Parameters
>
> **customerId** `string` *required*
>
> Plain customer ID (format: 'c\_01ABC...') of the customer to remove from groups.
>
> **customerGroupIdentifiers** `array` *required*
>
> One to 25 customer groups to remove the customer from. Each identifier must specify exactly one of customerGroupId, customerGroupKey, or externalId.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Remove Customer From Tenants
>
> **Slug:** `PLAIN_REMOVE_CUSTOMER_FROM_TENANTS`
>
> Idempotently remove a customer from one or more tenants.
>
> #### Input Parameters
>
> **tenantIdentifiers** `array` *required*
>
> One or more tenants to add or remove.
>
> **customerIdentifier** `object` *required*
>
> Customer whose memberships change.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Remove Labels From Thread
>
> **Slug:** `PLAIN_REMOVE_LABELS`
>
> Remove one or more concrete labels from a thread.
>
> #### Input Parameters
>
> **labelIds** `array` *required*
>
> Concrete label IDs to remove from their thread.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Remove Members from Tier
>
> **Slug:** `PLAIN_REMOVE_MEMBERS_FROM_TIER`
>
> Remove up to 25 tenants or companies from their current tiers.
>
> #### Input Parameters
>
> **memberIdentifiers** `array` *required*
>
> Tenants or companies to remove from their tiers.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Reorder Autoresponders
>
> **Slug:** `PLAIN_REORDER_AUTORESPONDERS`
>
> Reorder native autoresponders in one call.
>
> #### Input Parameters
>
> **autorespondersOrder** `array` *required*
>
> Autoresponders and their new orders.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Reorder Thread Field Schemas
>
> **Slug:** `PLAIN_REORDER_THREAD_FIELD_SCHEMAS`
>
> Reorder one or more thread-field schemas.
>
> #### Input Parameters
>
> **threadFieldSchemaOrders** `array` *required*
>
> Schemas and their new orders.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Reply To Email
>
> **Slug:** `PLAIN_REPLY_TO_EMAIL`
>
> Immediately and irreversibly send an external reply to an inbound email. Plain inherits the primary recipients and email channel from the referenced inbound email. The request can add CC and BCC recipients or send from a verified alternate support address while preserving email-client threading.
>
> #### Input Parameters
>
> **subject** `string`
>
> Optional replacement subject for the reply.
>
> **textContent** `string` *required*
>
> Plain-text reply body.
>
> **attachmentIds** `array`
>
> IDs of previously uploaded EMAIL attachments, at most 100.
>
> **markdownContent** `string`
>
> Markdown version of the same reply body.
>
> **hiddenRecipients** `array`
>
> BCC recipients.
>
> **inReplyToEmailId** `string` *required*
>
> Plain ID of the inbound email being replied to.
>
> **isHiddenFromUser** `boolean`
>
> Whether Plain should categorize the reply as hidden from the user.
>
> **additionalRecipients** `array`
>
> CC recipients.
>
> **fromAlternateSupportEmail** `object`
>
> Verified workspace support address to send from.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Run GraphQL Query
>
> **Slug:** `PLAIN_RUN_GRAPHQL_QUERY`
>
> Execute an arbitrary GraphQL document against Plain without a safety gate; mutations can immediately and irreversibly change data. This tool cannot predeclare sufficient permissions for every operation and field. GraphQL errors without data raise an error; partial responses can include errors.
>
> #### Input Parameters
>
> **query** `string` *required*
>
> A valid arbitrary GraphQL query or mutation string for Plain API. Use this only for an operation not covered by a specific action, after inspecting the complete document. Mutations may immediately and irreversibly create, deliver, update, or delete external data; this tool does not classify or confirm them. Authorization is operation- and selected-field-dependent, so the tool cannot predeclare sufficient permissions: the connected credential must already grant every permission required by the supplied document. Supports queries, mutations, inline fragments, and variables. DateTime fields (e.g., createdAt, updatedAt) are objects requiring subfield selection: use createdAt \{ iso8601 } — omitting subfields causes GRAPHQL\_VALIDATION\_FAILED. For paginated connections, request pageInfo \{ hasNextPage endCursor } and pass endCursor as the cursor argument in subsequent queries.
>
> **variables** `object`
>
> Variables for the GraphQL operation. Keys must match variable names in the query (without '\$'). Use empty dict \{} if no variables needed. Date range filter values must be UTC-normalized; non-UTC timestamps in createdAt or updatedAt filters silently exclude boundary records.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Search Customers
>
> **Slug:** `PLAIN_SEARCH_CUSTOMERS`
>
> Search customer profile fields or timeline text using explicit OR conditions.
>
> #### Input Parameters
>
> **last** `integer`
>
> Number of records to return moving backward.
>
> **after** `string`
>
> Cursor after which to return records. Use with first.
>
> **first** `integer`
>
> Number of records to return moving forward.
>
> **before** `string`
>
> Cursor before which to return records. Use with last.
>
> **filters** `object`
>
> Optional filters applied in addition to the search query.
>
> **searchQuery** `object` *required*
>
> Customer attributes and expressions to search.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Search Tenants
>
> **Slug:** `PLAIN_SEARCH_TENANTS`
>
> Search tenants by name, domain, or exact external ID.
>
> #### Input Parameters
>
> **last** `integer`
>
> Number of records to return moving backward.
>
> **after** `string`
>
> Cursor after which to return records. Use with first.
>
> **first** `integer`
>
> Number of records to return moving forward.
>
> **before** `string`
>
> Cursor before which to return records. Use with last.
>
> **filters** `object`
>
> Optional filters applied in addition to the search query.
>
> **searchQuery** `object` *required*
>
> Tenant search term.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Search Threads
>
> **Slug:** `PLAIN_SEARCH_THREADS`
>
> Search thread titles, messages, and customer names or emails.
>
> #### Input Parameters
>
> **last** `integer`
>
> Number of records to return moving backward.
>
> **term** `string` *required*
>
> Case-insensitive full-text search term.
>
> **after** `string`
>
> Cursor after which to return records. Use with first.
>
> **first** `integer`
>
> Number of records to return moving forward.
>
> **before** `string`
>
> Cursor before which to return records. Use with last.
>
> **filters** `object`
>
> Optional rich filters.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Send Email/Slack Discussion Message
>
> **Slug:** `PLAIN_SEND_DISCUSSION_MESSAGE`
>
> Immediately and irreversibly deliver a message in an existing discussion. The discussion ID determines the external recipients and original EMAIL or SLACK channel; they cannot be reviewed or overridden here. Live provider authorization requires threadDiscussionMessage:create, although the current operation page omits it.
>
> #### Input Parameters
>
> **discussionId** `string` *required*
>
> Existing EMAIL or SLACK side-conversation ID. Sidekick and agent-session discussions are intentionally unsupported.
>
> **attachmentIds** `array`
>
> Previously uploaded THREAD\_DISCUSSION attachment IDs.
>
> **markdownContent** `string` *required*
>
> Message body in Markdown.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Send Message
>
> **Slug:** `PLAIN_SEND_MESSAGE`
>
> Immediately and irreversibly deliver a message through an existing thread. The thread determines the delivery channel and primary recipient or channel; this action does not let the caller review or override them. Email threads can add CC and BCC recipients. By default Plain sends as the connected machine user, while impersonation can make the message appear from a customer or an allow-listed workspace user.
>
> #### Input Parameters
>
> **threadId** `string` *required*
>
> Unique identifier of the thread to reply to
>
> **textContent** `string` *required*
>
> Plain text content of the message. If you want to send markdown-formatted content, provide the same content here and in markdownContent.
>
> **attachmentIds** `array`
>
> IDs of previously uploaded attachments to include, at most 100
>
> **impersonation** `object`
>
> Send as exactly one customer or allow-listed Plain workspace user
>
> **markdownContent** `string`
>
> Optional markdown-formatted content of the message. If provided, textContent should contain the plain text version of the same content.
>
> **channelSpecificOptions** `object`
>
> Channel-specific options such as email CC/BCC recipients
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Send New Email
>
> **Slug:** `PLAIN_SEND_NEW_EMAIL`
>
> Immediately and irreversibly send an external email to a customer. Plain uses the customer's email as the primary recipient. The request can add CC and BCC recipients, send from a verified alternate support address, and attach the email to an existing thread; the delivery channel remains email.
>
> #### Input Parameters
>
> **subject** `string` *required*
>
> Email subject line.
>
> **threadId** `string`
>
> Existing thread to attach the email to; omit to create a thread.
>
> **customerId** `string` *required*
>
> Plain ID of the recipient customer.
>
> **textContent** `string` *required*
>
> Plain-text email body.
>
> **attachmentIds** `array`
>
> IDs of previously uploaded EMAIL attachments, at most 100.
>
> **markdownContent** `string`
>
> Markdown version of the same email body for rich-text clients.
>
> **hiddenRecipients** `array`
>
> BCC recipients.
>
> **isHiddenFromUser** `boolean`
>
> Whether Plain should categorize the email as hidden from the user.
>
> **additionalRecipients** `array`
>
> CC recipients.
>
> **fromAlternateSupportEmail** `object`
>
> Verified workspace support address to send from.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Set Customer Tenants
>
> **Slug:** `PLAIN_SET_CUSTOMER_TENANTS`
>
> Replace a customer's complete tenant membership set in one call.
>
> #### Input Parameters
>
> **tenantIdentifiers** `array` *required*
>
> Complete tenant set; an empty list removes all memberships.
>
> **customerIdentifier** `object` *required*
>
> Customer whose memberships are replaced.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Transition Thread Status
>
> **Slug:** `PLAIN_TRANSITION_THREAD_STATUS`
>
> Move a thread to Todo, Snoozed, or Done.
>
> #### Input Parameters
>
> **status** `string ("TODO" | "SNOOZED" | "DONE")` *required*
>
> Destination status.
>
> **threadId** `string` *required*
>
> Thread to transition.
>
> **statusDetail** `string ("CREATED" | "IN_PROGRESS" | "NEW_REPLY" | "THREAD_LINK_UPDATED" | "THREAD_DISCUSSION_RESOLVED" | "WAITING_FOR_CUSTOMER" | "WAITING_FOR_DURATION" | "WAITING_INDEFINITELY" | "IGNORED" | "DONE_MANUALLY_SET" | "DONE_AUTOMATICALLY_SET")`
>
> Provider status-detail enum value.
>
> **durationSeconds** `integer`
>
> Snooze duration in seconds.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Unarchive Label Type
>
> **Slug:** `PLAIN_UNARCHIVE_LABEL_TYPE`
>
> Restore an archived label type for use on new threads.
>
> #### Input Parameters
>
> **labelTypeId** `string` *required*
>
> Label-type ID.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Unmark Customer As Spam
>
> **Slug:** `PLAIN_UNMARK_CUSTOMER_AS_SPAM`
>
> Idempotently clear a customer's spam flag and restore inbox visibility.
>
> #### Input Parameters
>
> **customerId** `string` *required*
>
> Plain ID of the customer whose spam status changes.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Update Autoresponder
>
> **Slug:** `PLAIN_UPDATE_AUTORESPONDER`
>
> Update an autoresponder that automatically sends outbound customer replies. Enabling or changing a matching autoresponder can cause irreversible external messages. Plain permits at most 25 autoresponders per workspace and delays up to 900 seconds.
>
> #### Input Parameters
>
> **name** `object`
>
> Wrapped replacement name.
>
> **order** `object`
>
> Wrapped replacement order.
>
> **isEnabled** `object`
>
> Wrapped enabled-state update.
>
> **conditions** `array`
>
> Replacement conditions.
>
> **textContent** `object`
>
> Wrapped text-body update.
>
> **messageSources** `array`
>
> Replacement sources.
>
> **autoresponderId** `string` *required*
>
> Autoresponder to update.
>
> **markdownContent** `object`
>
> Wrapped markdown-body update.
>
> **responseDelaySeconds** `object`
>
> Wrapped response-delay update.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Update Company
>
> **Slug:** `PLAIN_UPDATE_COMPANY`
>
> Upserts (creates or updates) a company in Plain. Provide companyId to update by ID or companyDomainName to upsert by domain. When both identifiers are omitted, domainName is also used as companyDomainName for compatibility. Use this to create new companies, update existing company details (name, domain, contract value), or assign account owners.
>
> #### Input Parameters
>
> **name** `string` *required*
>
> Name for the company.
>
> **companyId** `string`
>
> Existing company ID to update (format: 'co\_...'). Provide this or companyDomainName. If both identifiers are omitted, domainName is used as companyDomainName.
>
> **domainName** `string` *required*
>
> Domain name for the company (e.g., 'acme.com').
>
> **contractValue** `integer`
>
> Optional contract value in cents. Must be non-negative; pass null explicitly to clear it.
>
> **companyDomainName** `string`
>
> Company domain name for lookup/upsert (e.g., 'acme.com'). Provide this or companyId. If both identifiers are omitted, this defaults to domainName; an explicit null or empty value is rejected instead of defaulted.
>
> **accountOwnerUserId** `string`
>
> ID of the user to assign as account owner; pass null explicitly to clear it.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Update Company Tier
>
> **Slug:** `PLAIN_UPDATE_COMPANY_TIER`
>
> Assign one company to a tier or clear its tier membership.
>
> #### Input Parameters
>
> **removeTier** `boolean`
>
> Set true, without tierIdentifier, to remove the company from its tier.
>
> **tierIdentifier** `object`
>
> Tier to assign. Omit it only when remove\_tier is true.
>
> **companyIdentifier** `object` *required*
>
> Company whose tier is changing.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Update Generated Reply
>
> **Slug:** `PLAIN_UPDATE_GENERATED_REPLY`
>
> Record teammate feedback on a generated reply.
>
> #### Input Parameters
>
> **feedback** `object` *required*
>
> Teammate feedback to record. type is required; its wrapped value may be POSITIVE, NEGATIVE, UNKNOWN, or null to clear existing feedback.
>
> **generatedReplyId** `string` *required*
>
> Generated reply to review.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Update Label Type
>
> **Slug:** `PLAIN_UPDATE_LABEL_TYPE`
>
> Update mutable label-type properties using field wrappers.
>
> #### Input Parameters
>
> **icon** `object`
>
> Wrapped icon update.
>
> **name** `object`
>
> Wrapped replacement name.
>
> **color** `object`
>
> Wrapped color update.
>
> **externalId** `object`
>
> Wrapped external-ID update.
>
> **description** `object`
>
> Wrapped description update.
>
> **labelTypeId** `string` *required*
>
> Label type to update.
>
> **isExcludedFromAi** `object`
>
> Wrapped AI-exclusion update.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Update Note
>
> **Slug:** `PLAIN_UPDATE_NOTE`
>
> Replace an internal note's content and optional attachment list.
>
> #### Input Parameters
>
> **text** `string` *required*
>
> Replacement plain-text note body.
>
> **noteId** `string` *required*
>
> Note to update.
>
> **markdown** `string`
>
> Replacement Markdown note body.
>
> **attachmentIds** `array`
>
> Complete replacement list of uploaded NOTE attachment IDs.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Update Tier SLA
>
> **Slug:** `PLAIN_UPDATE_SERVICE_LEVEL_AGREEMENT`
>
> Update a legacy tier SLA without changing its SLA type.
>
> #### Input Parameters
>
> **breachActions** `array`
>
> Replacement pre-breach actions.
>
> **threadPriorityFilter** `object`
>
> Wrapped replacement priority filter.
>
> **nextResponseTimeMinutes** `object`
>
> Wrapped replacement next-response target.
>
> **serviceLevelAgreementId** `string` *required*
>
> Plain ID of the legacy SLA to update.
>
> **threadLabelTypeIdFilter** `object`
>
> Replacement label-type filter.
>
> **businessHoursScheduleIds** `array`
>
> Replacement business-hours schedules; empty means 24/7.
>
> **firstResponseTimeMinutes** `object`
>
> Wrapped replacement first-response target.
>
> **pauseOnStatusDetailTypes** `object`
>
> Wrapped replacement pause statuses.
>
> **firstResolutionTimeMinutes** `object`
>
> Wrapped replacement first-resolution target.
>
> **totalResolutionTimeMinutes** `object`
>
> Wrapped replacement total-resolution target.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Update SLA Policy
>
> **Slug:** `PLAIN_UPDATE_SERVICE_LEVEL_AGREEMENT_POLICY`
>
> Replace an SLA policy's targets; omitted target types and their trackers are deleted.
>
> #### Input Parameters
>
> **name** `object`
>
> Wrapped replacement policy name.
>
> **targets** `array` *required*
>
> Complete replacement set of policy targets.
>
> **description** `object`
>
> Wrapped description; null clears it.
>
> **serviceLevelAgreementPolicyId** `string` *required*
>
> Plain SLA policy ID.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Update Snippet
>
> **Slug:** `PLAIN_UPDATE_SNIPPET`
>
> Update selected snippet fields using Plain's field-level wrappers.
>
> #### Input Parameters
>
> **name** `object`
>
> Wrapped replacement name; omit to leave unchanged.
>
> **path** `object`
>
> Wrapped replacement path; set value to null to clear it.
>
> **text** `object`
>
> Wrapped replacement plain-text body.
>
> **markdown** `object`
>
> Wrapped replacement Markdown body.
>
> **snippetId** `string` *required*
>
> Snippet to update.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Update Task
>
> **Slug:** `PLAIN_UPDATE_TASK`
>
> Update selected fields on an existing task.
>
> #### Input Parameters
>
> **title** `string`
>
> Replacement task title.
>
> **status** `string ("TODO" | "IN_PROGRESS" | "DONE" | "CANCELLED")`
>
> Replacement lifecycle status.
>
> **taskId** `string` *required*
>
> Plain task ID to update.
>
> **priority** `integer`
>
> Replacement priority from 0 to 3.
>
> **tenantId** `string`
>
> Optional parent tenant ID. On update, setting this clears any existing company parent; omitting it leaves the current parent unchanged.
>
> **accountId** `string`
>
> Optional parent account ID.
>
> **companyId** `string`
>
> Optional parent company ID. On update, setting this clears any existing tenant parent; omitting it leaves the current parent unchanged.
>
> **assignedTo** `object`
>
> Replacement user or machine-user assignee.
>
> **description** `string`
>
> Replacement task description.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Update Tenant Tier
>
> **Slug:** `PLAIN_UPDATE_TENANT_TIER`
>
> Assign one tenant to a tier or clear its tier membership.
>
> #### Input Parameters
>
> **removeTier** `boolean`
>
> Set true, without tierIdentifier, to remove the tenant from its tier.
>
> **tierIdentifier** `object`
>
> Tier to assign. Omit it only when remove\_tier is true.
>
> **tenantIdentifier** `object` *required*
>
> Tenant whose tier is changing.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Update Thread Title
>
> **Slug:** `PLAIN_UPDATE_THREAD`
>
> Tool to update a thread's title. Use when renaming a thread after confirming its ID.
>
> #### Input Parameters
>
> **title** `string` *required*
>
> New title for the thread
>
> **threadId** `string` *required*
>
> Unique identifier of the thread to update
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Update Thread Attributes
>
> **Slug:** `PLAIN_UPDATE_THREAD_ATTRIBUTES`
>
> Change one thread priority, customer, external ID, tenant, or tier attribute.
>
> #### Input Parameters
>
> **priority** `integer`
>
> New priority.
>
> **threadId** `string` *required*
>
> Thread to update.
>
> **clearTier** `boolean`
>
> Detach the current tier.
>
> **customerId** `string`
>
> New customer ID.
>
> **externalId** `string`
>
> New external ID. Use clearExternalId to remove it.
>
> **clearTenant** `boolean`
>
> Detach the current tenant.
>
> **onlyIfDefault** `boolean`
>
> Change priority only while it remains the default.
>
> **tierIdentifier** `object`
>
> New tier selector.
>
> **clearExternalId** `boolean`
>
> Clear the current external ID.
>
> **tenantIdentifier** `object`
>
> New tenant selector.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Update Thread Field Schema
>
> **Slug:** `PLAIN_UPDATE_THREAD_FIELD_SCHEMA`
>
> Update mutable properties of a thread-field schema.
>
> #### Input Parameters
>
> **label** `object`
>
> Wrapped replacement label.
>
> **order** `integer`
>
> Replacement order.
>
> **enumValues** `array`
>
> Replacement ENUM values.
>
> **isRequired** `boolean`
>
> Replacement required flag.
>
> **description** `object`
>
> Wrapped replacement description.
>
> **defaultDateValue** `object`
>
> Wrapped ISO 8601 date default update.
>
> **isClientReadonly** `boolean`
>
> Replacement client-readonly flag.
>
> **defaultNumberValue** `object`
>
> Wrapped numeric default update.
>
> **defaultStringValue** `object`
>
> Wrapped string default update.
>
> **defaultBooleanValue** `object`
>
> Wrapped boolean default update.
>
> **isAiAutoFillEnabled** `boolean`
>
> Replacement AI auto-fill flag.
>
> **isAvailableToAgents** `boolean`
>
> Replacement agent-availability flag.
>
> **threadFieldSchemaId** `string` *required*
>
> Schema to update.
>
> **dependsOnThreadField** `object`
>
> Wrapped dependency update.
>
> **dependsOnLabelTypeIds** `array`
>
> Replacement label dependencies.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Apply or Clear Thread SLA Policy
>
> **Slug:** `PLAIN_UPDATE_THREAD_SERVICE_LEVEL_AGREEMENT_POLICY`
>
> Apply an SLA policy, or clear it so the thread falls back to its tier's SLAs.
>
> #### Input Parameters
>
> **threadId** `string` *required*
>
> Thread receiving or clearing the policy.
>
> **serviceLevelAgreementPolicyId** `string` *required*
>
> Policy to apply, or null to clear it and fall back to the tier SLAs.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Update Tier
>
> **Slug:** `PLAIN_UPDATE_TIER`
>
> Update selected fields on an existing support tier.
>
> #### Input Parameters
>
> **name** `object`
>
> Wrapped replacement nonblank tier name.
>
> **color** `object`
>
> Wrapped replacement #RRGGBB tier color.
>
> **tierId** `string` *required*
>
> Plain tier ID.
>
> **isDefault** `object`
>
> Wrapped replacement default-tier flag.
>
> **externalId** `object`
>
> Wrapped external ID; null clears it.
>
> **defaultThreadPriority** `object`
>
> Wrapped replacement default thread priority.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Upsert Customer
>
> **Slug:** `PLAIN_UPSERT_CUSTOMER`
>
> Tool to upsert (create or update) a customer. Use when syncing or ensuring a customer record exists before subsequent actions.
>
> #### Input Parameters
>
> **onCreate** `object` *required*
>
> Details for creation if not found.
>
> **onUpdate** `object` *required*
>
> Details for update if found.
>
> **identifier** `object` *required*
>
> Selector for existing customer.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Upsert Customer Group
>
> **Slug:** `PLAIN_UPSERT_CUSTOMER_GROUP`
>
> Idempotently create or update a customer group using machine-user-safe calls.
>
> #### Input Parameters
>
> **key** `string` *required*
>
> Unique human-readable customer-group key.
>
> **name** `string` *required*
>
> Customer-group display name.
>
> **color** `string` *required*
>
> Six-digit hexadecimal customer-group color, including '#'.
>
> **externalId** `string`
>
> Customer-group ID from your own system.
>
> **identifier** `object` *required*
>
> Exactly one identifier used to find an existing customer group.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Upsert Tenant
>
> **Slug:** `PLAIN_UPSERT_TENANT`
>
> Create or update a tenant while synchronizing its stable external ID.
>
> #### Input Parameters
>
> **url** `object`
>
> URL update; use a null value to clear the URL.
>
> **name** `string` *required*
>
> Tenant display name.
>
> **externalId** `string` *required*
>
> Stable tenant ID from your own system.
>
> **identifier** `object` *required*
>
> Exactly one identifier used to find an existing tenant.
>
> **primaryDomain** `object`
>
> Beta primary-domain update; use a null value to clear it.
>
> **alternateDomains** `object`
>
> Beta complete alternate-domain list to set.
>
> **isDomainAutoJoinEnabled** `object`
>
> Beta setting for automatic membership by matching email domain.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Upsert Tenant Field
>
> **Slug:** `PLAIN_UPSERT_TENANT_FIELD`
>
> Set one typed custom field value for a tenant.
>
> #### Input Parameters
>
> **type** `string ("STRING_TYPE" | "NUMBER_TYPE" | "BOOLEAN_TYPE" | "STRING_ARRAY" | "DATETIME_TYPE" | "USER_REFERENCE_TYPE" | "TENANT_REFERENCE_TYPE")` *required*
>
> Type of the tenant-field schema.
>
> **dateValue** `string`
>
> ISO 8601 value for DATETIME\_TYPE.
>
> **arrayValue** `array`
>
> Value for STRING\_ARRAY.
>
> **numberValue** `number`
>
> Value for NUMBER\_TYPE.
>
> **stringValue** `string`
>
> Value for STRING\_TYPE.
>
> **booleanValue** `boolean`
>
> Value for BOOLEAN\_TYPE.
>
> **userReferenceValues** `array`
>
> One or more Plain user IDs for USER\_REFERENCE\_TYPE. To remove the field value, call DeleteTenantField instead.
>
> **tenantFieldIdentifier** `object` *required*
>
> Tenant and field to update.
>
> **tenantReferenceValues** `array`
>
> One or more Plain tenant IDs for TENANT\_REFERENCE\_TYPE. To remove the field value, call DeleteTenantField instead.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Upsert Tenant Field Schemas
>
> **Slug:** `PLAIN_UPSERT_TENANT_FIELD_SCHEMAS`
>
> Create or update tenant-field schemas keyed by source and external field ID.
>
> #### Input Parameters
>
> **tenantFieldSchemas** `array` *required*
>
> Tenant-field schemas to create or update.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

## Triggers

> [accordion] Customer Event
>
> **Slug:** `PLAIN_CUSTOMER_EVENT`
>
> **Type:** webhook
>
> Fires when a customer in Plain is created, updated or deleted.
>
> `event_type` says which it was, `created`, `updated` or `deleted`, in the same vocabulary the config filters on — so a single subscription to all three can branch downstream without matching on Plain's raw event names.
>
> Group membership changes are a separate slug, `customer_group_membership_changed`.
>
> #### Configuration
>
> **event\_type** `array`
>
> Only fire for these kinds of event, e.g. `['created', 'deleted']`. Choose from `created`, `updated` and `deleted`. Leave unset to fire for every kind.
>
> #### Payload
>
> **customer** `object`
>
> A customer record in Plain.
>
> **event\_type** `string ("created" | "updated" | "deleted")` *required*
>
> What happened to the customer: `created`, `updated` or `deleted`.
>
> **id** `string` *required*
>
> Unique id of this event (e.g. `pEv_…`), stable across Plain's delivery retries.
>
> **previous\_customer** `object`
>
> A customer record in Plain.
>
> **timestamp** `string` *required*
>
> ISO 8601 time the event happened in Plain.
>
> **workspace\_id** `string` *required*
>
> Id of the Plain workspace the event came from.

> [accordion] Customer Group Changed
>
> **Slug:** `PLAIN_CUSTOMER_GROUP_CHANGED`
>
> **Type:** webhook
>
> Fires when a customer group is created, edited or deleted in Plain.
>
> #### Payload
>
> **customer\_group** `object`
>
> A group customers can belong to, used for segmentation in Plain.
>
> **id** `string` *required*
>
> Unique id of this event (e.g. `pEv_…`), stable across Plain's delivery retries.
>
> **previous\_customer\_group** `object`
>
> A group customers can belong to, used for segmentation in Plain.
>
> **timestamp** `string` *required*
>
> ISO 8601 time the event happened in Plain.
>
> **workspace\_id** `string` *required*
>
> Id of the Plain workspace the event came from.

> [accordion] Customer Group Membership Changed
>
> **Slug:** `PLAIN_CUSTOMER_GROUP_MEMBERSHIP_CHANGED`
>
> **Type:** webhook
>
> Fires when a customer is added to or removed from a customer group in Plain.
>
> Use it to re-segment a customer downstream the moment their grouping in Plain changes — move them onto a different plan's onboarding, change who gets paged for their threads, sync the new segment into your CRM.
>
> `change` says which direction it was, `added` or `removed`, straight from Plain. Which group it was is the one that differs between `customer.customer_group_memberships` and `previous_customer.customer_group_memberships`, both of which carry the customer's full membership list.
>
> #### Payload
>
> **change** `string ("added" | "removed")` *required*
>
> Whether the customer joined or left a group: `added` or `removed`.
>
> **customer** `object` *required*
>
> The customer with their group memberships as they are now.
>
> **id** `string` *required*
>
> Unique id of this event (e.g. `pEv_…`), stable across Plain's delivery retries.
>
> **previous\_customer** `object` *required*
>
> The same customer with their group memberships as they were before the change.
>
> **timestamp** `string` *required*
>
> ISO 8601 time the event happened in Plain.
>
> **workspace\_id** `string` *required*
>
> Id of the Plain workspace the event came from.

> [accordion] Thread Created
>
> **Slug:** `PLAIN_THREAD_CREATED`
>
> **Type:** webhook
>
> Fires when a new support thread is opened in Plain.
>
> #### Payload
>
> **id** `string` *required*
>
> Unique id of this event (e.g. `pEv_…`), stable across Plain's delivery retries.
>
> **thread** `object` *required*
>
> The thread that was created.
>
> **timestamp** `string` *required*
>
> ISO 8601 time the event happened in Plain.
>
> **workspace\_id** `string` *required*
>
> Id of the Plain workspace the event came from.

> [accordion] Thread Custom Field Updated
>
> **Slug:** `PLAIN_THREAD_CUSTOM_FIELD_UPDATED`
>
> **Type:** webhook
>
> Fires when one of your own thread fields is set, changed or cleared on a Plain thread.
>
> #### Payload
>
> **custom\_field** `object`
>
> One of your own structured fields set on a thread.  Exactly one of the four value fields is populated, decided by `type`.
>
> **id** `string` *required*
>
> Unique id of this event (e.g. `pEv_…`), stable across Plain's delivery retries.
>
> **previous\_custom\_field** `object`
>
> One of your own structured fields set on a thread.  Exactly one of the four value fields is populated, decided by `type`.
>
> **thread** `object` *required*
>
> The thread the field is on.
>
> **timestamp** `string` *required*
>
> ISO 8601 time the event happened in Plain.
>
> **workspace\_id** `string` *required*
>
> Id of the Plain workspace the event came from.

> [accordion] Thread Message Received
>
> **Slug:** `PLAIN_THREAD_MESSAGE_RECEIVED`
>
> **Type:** webhook
>
> Fires when an inbound message arrives on a Plain thread.
>
> Covers email, in-app chat, Slack, Discord and Microsoft Teams, and each channel ships its own message shape, so read `channel` before reading `message`. For the replies your own team sends out, use the Thread Message Sent trigger instead.
>
> #### Configuration
>
> **channels** `array`
>
> Only fire for messages that arrived on these channels, e.g. `['email', 'slack']`. Leave unset to fire for every channel.
>
> #### Payload
>
> **channel** `string ("email" | "chat" | "slack" | "discord" | "ms_teams")` *required*
>
> Channel the message arrived on, and the shape `message` has.
>
> **id** `string` *required*
>
> Unique id of this event (e.g. `pEv_…`), stable across Plain's delivery retries.
>
> **message** `string` *required*
>
> The message itself. Each channel carries its own fields — read `channel` to know which shape you have.
>
> **thread** `object` *required*
>
> The thread the message arrived on.
>
> **timestamp** `string` *required*
>
> ISO 8601 time the event happened in Plain.
>
> **workspace\_id** `string` *required*
>
> Id of the Plain workspace the event came from.

> [accordion] Thread Message Sent
>
> **Slug:** `PLAIN_THREAD_MESSAGE_SENT`
>
> **Type:** webhook
>
> Fires when your team sends a message out on a Plain thread.
>
> Covers email, in-app chat, Slack, Discord and Microsoft Teams, and each channel ships its own message shape, so read `channel` before reading `message`. Editing a Slack or Discord message afterwards does not fire it again, and for messages arriving from the customer use the Thread Message Received trigger instead.
>
> #### Configuration
>
> **channels** `array`
>
> Only fire for messages sent on these channels, e.g. `['email', 'slack']`. Leave unset to fire for every channel.
>
> #### Payload
>
> **channel** `string ("email" | "chat" | "slack" | "discord" | "ms_teams")` *required*
>
> Channel the message went out on, and the shape `message` has.
>
> **id** `string` *required*
>
> Unique id of this event (e.g. `pEv_…`), stable across Plain's delivery retries.
>
> **message** `string` *required*
>
> The message itself. Each channel carries its own fields — read `channel` to know which shape you have.
>
> **thread** `object` *required*
>
> The thread the message was sent on.
>
> **timestamp** `string` *required*
>
> ISO 8601 time the event happened in Plain.
>
> **workspace\_id** `string` *required*
>
> Id of the Plain workspace the event came from.

> [accordion] Thread Note Created
>
> **Slug:** `PLAIN_THREAD_NOTE_CREATED`
>
> **Type:** webhook
>
> Fires when an internal note is added to a thread in Plain.
>
> Carries no `mentions`: Plain only reports them on its separate mention event, which is `PLAIN_THREAD_NOTE_MENTIONED`. Subscribing to both slugs delivers every mentioning note twice, under two different event ids.
>
> #### Payload
>
> **id** `string` *required*
>
> Unique id of this event (e.g. `pEv_…`), stable across Plain's delivery retries.
>
> **note** `object` *required*
>
> The note that was added.
>
> **thread** `object` *required*
>
> The thread the note was added to.
>
> **timestamp** `string` *required*
>
> ISO 8601 time the event happened in Plain.
>
> **workspace\_id** `string` *required*
>
> Id of the Plain workspace the event came from.

> [accordion] Thread Note Mention Created
>
> **Slug:** `PLAIN_THREAD_NOTE_MENTIONED`
>
> **Type:** webhook
>
> Fires when an internal note mentions a machine user in Plain.
>
> The only event that carries `mentions`. The raw `<@mu_…>` markup is not guaranteed in either `note.text` or `note.markdown`, so this slug — not scanning the note body — is how a consumer learns who was mentioned.
>
> Plain publishes such a note twice, here and as `thread.note_created`, so subscribing to both this and `PLAIN_THREAD_NOTE_CREATED` delivers it twice, under two different event ids.
>
> #### Payload
>
> **id** `string` *required*
>
> Unique id of this event (e.g. `pEv_…`), stable across Plain's delivery retries.
>
> **mentions** `array`
>
> Machine users the note mentions. Plain reports mentions of machine users only, never of human teammates.
>
> **note** `object` *required*
>
> The note that was added.
>
> **thread** `object` *required*
>
> The thread the note was added to.
>
> **timestamp** `string` *required*
>
> ISO 8601 time the event happened in Plain.
>
> **workspace\_id** `string` *required*
>
> Id of the Plain workspace the event came from.

> [accordion] Thread Properties Updated
>
> **Slug:** `PLAIN_THREAD_PROPERTIES_UPDATED`
>
> **Type:** webhook
>
> Fires when a thread's status, assignee, priority or labels change in Plain.
>
> Every event carries the thread's new state alongside its state immediately before the change, and names which of the four properties changed. Assignment events also cover reassignment, so both sides can be populated.
>
> #### Configuration
>
> **properties** `array`
>
> Only fire when one of these properties changed, e.g. `['status', 'priority']`. Choose from `status`, `assignment`, `priority` and `labels`. Leave unset to fire for all four.
>
> #### Payload
>
> **changed** `string ("status" | "assignment" | "priority" | "labels")` *required*
>
> Which property changed: `status`, `assignment`, `priority` or `labels`.
>
> **id** `string` *required*
>
> Unique id of this event (e.g. `pEv_…`), stable across Plain's delivery retries.
>
> **previous\_thread** `object` *required*
>
> The thread as it was immediately before the change.
>
> **thread** `object` *required*
>
> The thread after the change.
>
> **timestamp** `string` *required*
>
> ISO 8601 time the event happened in Plain.
>
> **workspace\_id** `string` *required*
>
> Id of the Plain workspace the event came from.

> [accordion] Thread Tenant Updated
>
> **Slug:** `PLAIN_THREAD_TENANT_UPDATED`
>
> **Type:** webhook
>
> Fires when a thread's tenant is set, changed or cleared in Plain.
>
> Plain also sends this event when a thread's tenant is reapplied without changing, in which case both sides hold the same tenant or both are null.
>
> #### Payload
>
> **id** `string` *required*
>
> Unique id of this event (e.g. `pEv_…`), stable across Plain's delivery retries.
>
> **previous\_tenant** `object`
>
> A tenant — the account or organisation a thread belongs to.
>
> **tenant** `object`
>
> A tenant — the account or organisation a thread belongs to.
>
> **thread** `object` *required*
>
> The thread whose tenant changed.
>
> **timestamp** `string` *required*
>
> ISO 8601 time the event happened in Plain.
>
> **workspace\_id** `string` *required*
>
> Id of the Plain workspace the event came from.
