create_thread
Create a new support thread for a customer using markdown content; automatically creates the customer by email if they don't exist.
Instructions
Create a new support thread for a customer. Provide exactly one customer identifier (email, ID, or external ID) and markdown content for the initial message. When using customerEmail, the customer is automatically created in Plain if they don't exist. Optionally set title, description, priority, labels, custom fields, and external ID.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | No | Affected app identifier (e.g. 'web', 'mobile', 'api') | |
| stage | No | Environment stage (e.g. 'production', 'staging', 'develop') | |
| title | No | Thread title | |
| githubPr | No | GitHub PR URL | |
| markdown | Yes | Markdown content for the first timeline entry in the thread | |
| priority | No | Priority: 0 = urgent, 1 = high, 2 = normal (default), 3 = low | |
| tenantId | No | Tenant ID to associate with the thread | |
| customerId | No | Existing Plain customer ID. Provide either customerEmail, customerId, or customerExternalId. | |
| externalId | No | Your own unique identifier for this thread | |
| description | No | Thread description / preview text | |
| impactLevel | No | Impact level: P0 (critical), P1, P2, RBS (release blocker staging), RBP (release blocker production), not-a-bug | |
| labelTypeIds | No | Label type IDs to attach. Use get_label_types to discover available IDs. | |
| notionTicket | No | Notion ticket URL or ID | |
| reportedFrom | No | URL where the issue was reported from | |
| customerEmail | No | Customer email address. Provide either customerEmail, customerId, or customerExternalId. | |
| sentrySession | No | Sentry replay URL or replay ID | |
| posthogSession | No | PostHog session replay URL or session recording ID | |
| requestFeature | No | Whether this is a feature request | |
| customerFullName | No | Customer full name. Used when upserting a customer by email (ignored when customerId is provided). | |
| customerExternalId | No | Customer external ID. Provide either customerEmail, customerId, or customerExternalId. |