Skip to content

Helpdesk

Plain
API integration

Ship Helpdesk features without building the integration. Full Plain API access via Proxy and 10+ MCP-ready tools for AI agents — extend models and mappings to fit your product.

Talk to us
Plain

Use Cases

Why integrate with Plain

Common scenarios for SaaS companies building Plain integrations for their customers.

01

Embed AI-drafted responses into Plain threads

AI customer support platforms can read historical thread context and silently push autonomous AI conversations into Plain as a transcript, giving human agents a complete audit trail without triggering SLAs or customer notifications.

02

Sync CRM and account health data into support context

Customer success and CRM platforms can upsert customers into Plain by externalId and monitor thread volume per account, letting support agents see subscription tier and account health alongside every conversation.

03

Ship native in-app support inside your product

SaaS platforms can replace generic chat widgets by using Plain's API to create threads directly from their own dashboard, CLI, or admin panel — delivering a fully white-labeled support experience backed by Plain's workflow engine.

04

Two-way issue tracker sync for engineering escalations

Developer tool companies can link engineering issues to Plain threads so that when a bug is resolved, the associated customer thread is automatically updated with a reply — closing the loop between engineering and support.

05

Backfill historical conversations during migration

Platforms helping customers migrate off legacy helpdesks can bulk-import threads and messages into Plain without triggering autoresponders, SLAs, or duplicate records — using idempotent externalId-based syncs.

What You Can Build

Ship these features with Truto + Plain

Concrete product features your team can ship faster by leveraging Truto’s Plain integration instead of building from scratch.

01

Idempotent customer upsert pipeline

Sync your user base into Plain using externalId or email with bulk create endpoints, so customer records stay in lockstep with your product database without duplicates.

02

Silent AI conversation logging

Use thread import and bulk message creation to log full AI-agent transcripts into Plain as closed threads, bypassing SLAs and customer-facing notifications.

03

Live ticket creation from your app

Fire create_a_plain_thread from your in-product support UI or CLI to open TODO-status threads that trigger Plain's assignment rules, SLAs, and autoresponders.

04

Pre-signed attachment uploads

Generate upload URLs from Plain, POST files directly to storage, and attach the resulting attachment IDs to thread messages — avoiding heavy base64 payloads.

05

Dynamic label taxonomy sync

Programmatically create Plain label types with matching names, hex colors, and icons so your product categories map cleanly to Plain threads for automated tagging.

06

Account-level thread analytics

Query threads by externalId to detect spikes in high-priority conversations per customer and surface at-risk accounts inside your CS or analytics product.

SuperAI

Plain AI agent tools

Comprehensive AI agent toolset with fine-grained control. Integrates with MCP clients like Cursor and Claude, or frameworks like LangChain.

list_all_plain_me

Get the Plain workspace this API key belongs to (myWorkspace).

list_all_plain_permissions

List the permissions granted to this API key (myPermissions).

list_all_plain_customers

List customers in the workspace, newest pages by cursor. Optional `filters` (CustomersFilter JSON).

get_single_plain_customer_by_id

Get one customer by Plain customer ID.

create_a_plain_customer

Create or update a customer (upsertCustomer). Body: `input` = UpsertCustomerInput (identifier {emailAddress | externalId | customerId}, onCreate {fullName, email {email, isVerified}, externalId}, onUpdate {}). Returns result CREATED/UPDATED/NOOP and the customer.

plain_customers_bulk_create

Bulk import customers (importCustomers). Body: `input` = ImportCustomersInput (customers [{externalId, fullName, email, createdAt, tenants}]). Returns added/updated/skipped.

get_single_plain_customers_by_email_by_id

Get a customer by email address (the id is the email).

get_single_plain_customers_by_external_id_by_id

Get a customer by your external ID (the id is the external ID).

list_all_plain_threads

List threads by cursor. Optional `filters` (ThreadsFilter JSON).

get_single_plain_thread_by_id

Get one thread by Plain thread ID.

create_a_plain_thread

Create a new thread for a customer (createThread), in TODO status. This is a normal new thread: like one made in Plain, it can start SLAs and autoresponders. To backfill history without that, use import. Body: `input` = CreateThreadInput: customerIdentifier (required: customerId, emailAddress or externalId), title, description, labelTypeIds, threadFields, assignedTo (userId or machineUserId), externalId, priority 0-3, accountIdentifier, channel (default API) and channelDetails (required for SLACK or MS_TEAMS). Returns the thread. Needs the thread:create and thread:read permissions.

plain_threads_import

Import a historical thread (importThread). Sends nothing to the customer and starts no SLA or autoresponder. Body: `input` = ImportThreadInput: customerIdentifier, title, externalId, priority 0-3, status, statusDetail and createdAt (all required), plus description, externalUrl, labelTypeIds, assignedTo and tenantId. Returns `result` (CREATED or NOOP) and `thread`. A repeated externalId returns NOOP, possibly with no thread: find that thread with threads-by-external-id. Needs the thread:import permission.

list_all_plain_threads_by_external_id

Find the thread with an external ID for one customer (threadByExternalId; external IDs are unique per customer). Query: `customer_id`, `external_id`. Returns zero or one thread.

plain_thread_messages_bulk_create

Import up to 25 historical messages into a thread (importThreadMessages). Sends nothing to the customer. Body: `input` = ImportThreadMessagesInput (threadId, threadMessages [{author, text, format, createdAt, type INBOUND|OUTBOUND|NOTE, externalId, attachmentIds}]). A repeated message externalId returns NOOP.

create_a_plain_attachment_upload_url

Create a pre-signed upload form for an attachment (createAttachmentUploadUrl). Body: `input` = CreateAttachmentUploadUrlInput (customerId, fileName, fileSizeBytes, attachmentType). POST the file as multipart/form-data to uploadFormUrl with uploadFormData, then reference attachment.id.

list_all_plain_label_types

List label types. Optional `filters` (LabelTypeFilter JSON, e.g. {"isArchived": false}).

create_a_plain_label_type

Create a label type (createLabelType). Body: `input` = CreateLabelTypeInput (name, externalId, color, icon).

list_all_plain_users

List workspace users (agents). Optional `filters` (UsersFilter JSON).

get_single_plain_users_by_email_by_id

Get a workspace user by email (the id is the email).

Why Truto

Why use Truto’s MCP server for Plain

Other MCP servers give you a static tool list for one app. Truto gives you a managed, multi-tenant MCP infrastructure across 1150+ integrations.

01

Auto-generated, always up to date

Tools are dynamically generated from curated documentation — not hand-coded. As integrations evolve, tools stay current without manual maintenance.

02

Fine-grained access control

Scope each MCP server to read-only, write-only, specific methods, or tagged tool groups. Expose only what your AI agent needs — nothing more.

03

Multi-tenant by design

Each MCP server is scoped to a single connected account with its own credentials. The URL itself is the auth token — no shared secrets, no credential leaking across tenants.

04

Works with every MCP client

Standard JSON-RPC 2.0 protocol. Paste the URL into Claude, ChatGPT, Cursor, or any MCP-compatible agent framework — tools are discovered automatically.

05

Built-in auth, rate limits, and error handling

Tool calls execute through Truto’s proxy layer with automatic OAuth refresh, rate-limit handling, and normalized error responses. No raw API plumbing in your agent.

06

Expiring and auditable servers

Create time-limited MCP servers for contractors or automated workflows. Optional dual-auth requires both the URL and a Truto API token for high-security environments.

How It Works

From zero to integrated

Start with Plain in a free sandbox, usually ready within one business day. No boilerplate, no maintenance burden.

01

Link your customer’s Plain account

Use Truto’s frontend SDK to connect your customer’s Plain account. We handle all OAuth and API key flows — you don’t need to create the OAuth app.

02

We handle authentication

Don’t spend time refreshing access tokens or figuring out secure storage. We handle it and inject credentials into every API request.

03

Call our API, we call Plain

Truto’s Proxy API is a 1-to-1 mapping of the Plain API. You call us, we call Plain, and pass the response back in the same cycle.

04

Unified response format

Every response follows a single format across all integrations. We translate Plain’s pagination into unified cursor-based pagination. Data is always in the result attribute.

FAQs

Common questions about Plain on Truto

Authentication, rate limits, data freshness, and everything else you need to know before you integrate.

How does Truto handle authentication with Plain?

Truto manages the Plain API key securely on behalf of each of your end users. Your product never stores or sees the credentials — Truto handles token storage, refresh, and injection into every API call.

What's the difference between creating a thread and importing a thread?

create_a_plain_thread opens a live TODO thread that triggers SLAs, assignment rules, and customer autoresponders — ideal for real user requests. plain_threads_import is silent: it backfills history or logs AI conversations without triggering notifications, making it safe for migrations and bulk syncs.

How do I prevent duplicate customers or threads during bulk sync?

Plain's API is designed for idempotent upserts via externalId. If you pass an externalId that already exists, Plain returns a NOOP result instead of creating a duplicate — so you can safely retry or re-run syncs without side effects.

How are file attachments handled?

You call create_a_plain_attachment_upload_url to get a pre-signed URL, POST the file directly as multipart/form-data, then attach the returned attachment.id to a thread message. Truto proxies the URL generation but the file upload goes directly to Plain's storage.

Can I look up a customer without knowing Plain's internal ID?

Yes. Truto exposes get_single_plain_customers_by_email_by_id and get_single_plain_customers_by_external_id_by_id, so you can resolve customers using the identifiers you already have in your own system.

Can I create custom labels programmatically?

Yes. Use create_a_plain_label_type to define new label types with custom names, hex colors, and icons, then apply them to threads to mirror your product's own categorization taxonomy.

Is the integration real-time or polling-based?

Reads via list and get endpoints are on-demand. For writes (creating threads, messages, customers, labels), changes are reflected in Plain immediately. Truto's sync configuration lets you control polling cadence for reads based on your freshness needs.

Plain

Get Plain integrated into your app

Our team understands what it takes to make a Plain integration successful. A short, crisp 30 minute call with folks who understand the problem.