# Plain Docs

## Docs

- [Introduction](https://www.plain.com/docs/graphql/introduction.md): An overview of Plain's GraphQL API.
- [Authentication](https://www.plain.com/docs/graphql/authentication.md)
- [Schema](https://www.plain.com/docs/graphql/schema.md)
- [Pagination](https://www.plain.com/docs/graphql/pagination.md)
- [Error handling](https://www.plain.com/docs/graphql/error-handling.md): GraphQL queries and mutations require different error handling.
- [Error codes](https://www.plain.com/docs/graphql/error-codes.md): If you receive an error code as part of an API call, this is where you can look up what it means
- [Customers](https://www.plain.com/docs/graphql/customers.md)
- [Fetch customers](https://www.plain.com/docs/graphql/customers/get.md)
- [Upserting customers](https://www.plain.com/docs/graphql/customers/upsert.md): Learn how to create and update customers programmatically.
- [Delete customers](https://www.plain.com/docs/graphql/customers/delete.md)
- [Mark customer as spam](https://www.plain.com/docs/graphql/customers/spam.md)
- [Customer groups](https://www.plain.com/docs/graphql/customers/customer-groups.md)
- [Companies](https://www.plain.com/docs/graphql/companies.md)
- [Fetch companies](https://www.plain.com/docs/graphql/companies/get-companies.md)
- [Upsert a company](https://www.plain.com/docs/graphql/companies/upsert.md)
- [Delete a company](https://www.plain.com/docs/graphql/companies/delete.md)
- [Update customer company](https://www.plain.com/docs/graphql/companies/update-customer-company.md)
- [Tenants](https://www.plain.com/docs/graphql/tenants.md)
- [Upserting tenants](https://www.plain.com/docs/graphql/tenants/upsert.md)
- [Get tenants](https://www.plain.com/docs/graphql/tenants/get.md)
- [Delete a tenant](https://www.plain.com/docs/graphql/tenants/delete.md)
- [Tenant fields](https://www.plain.com/docs/graphql/tenants/tenant-fields.md)
- [Add customers to tenants](https://www.plain.com/docs/graphql/tenants/add-customers.md)
- [Remove customers to tenants](https://www.plain.com/docs/graphql/tenants/remove-customers.md)
- [Set customer tenants](https://www.plain.com/docs/graphql/tenants/set-customer-tenants.md)
- [Threads](https://www.plain.com/docs/graphql/threads.md)
- [Fetch threads](https://www.plain.com/docs/graphql/threads/get.md)
- [Create threads](https://www.plain.com/docs/graphql/threads/create.md)
- [Importing threads](https://www.plain.com/docs/graphql/threads/import.md)
- [Update thread attributes](https://www.plain.com/docs/graphql/threads/update.md)
- [Delete a thread](https://www.plain.com/docs/graphql/threads/delete.md)
- [Assignment](https://www.plain.com/docs/graphql/threads/assignment.md)
- [Escalating threads](https://www.plain.com/docs/graphql/threads/escalation.md)
- [Changing status](https://www.plain.com/docs/graphql/threads/status-changes.md)
- [Thread fields](https://www.plain.com/docs/graphql/threads/thread-fields.md)
- [Autoresponders](https://www.plain.com/docs/graphql/threads/autoresponders.md)
- [Tiers & SLAs](https://www.plain.com/docs/graphql/tiers.md)
- [Get tiers](https://www.plain.com/docs/graphql/tiers/get.md)
- [Update company tier](https://www.plain.com/docs/graphql/tiers/update-company-tier.md)
- [Update tenant tier](https://www.plain.com/docs/graphql/tiers/update-tenant-tier.md)
- [Add companies and tenants to tiers](https://www.plain.com/docs/graphql/tiers/add-members.md)
- [Remove companies and tenants to tiers](https://www.plain.com/docs/graphql/tiers/remove-members.md)
- [Service level agreements](https://www.plain.com/docs/graphql/tiers/service-level-agreements.md)
- [Events](https://www.plain.com/docs/graphql/events.md): Log important events to have the full picture of what happened in Plain.
- [Create a customer event](https://www.plain.com/docs/graphql/events/create-customer-event.md)
- [Create a thread event](https://www.plain.com/docs/graphql/events/create-thread-event.md)
- [Labels](https://www.plain.com/docs/graphql/labels.md)
- [Add labels](https://www.plain.com/docs/graphql/labels/add.md)
- [Remove labels](https://www.plain.com/docs/graphql/labels/remove.md)
- [Manage label types](https://www.plain.com/docs/graphql/labels/label-types.md)
- [Messaging](https://www.plain.com/docs/graphql/messaging.md)
- [Reply to threads](https://www.plain.com/docs/graphql/messaging/reply-to-thread.md)
- [Send new emails](https://www.plain.com/docs/graphql/messaging/send-email.md)
- [Reply to emails](https://www.plain.com/docs/graphql/messaging/reply-email.md)
- [Suggested replies](https://www.plain.com/docs/graphql/messaging/suggested-replies.md)
- [Snippets](https://www.plain.com/docs/graphql/snippets.md)
- [Fetch snippets](https://www.plain.com/docs/graphql/snippets/get.md)
- [Create a snippet](https://www.plain.com/docs/graphql/snippets/create.md)
- [Update a snippet](https://www.plain.com/docs/graphql/snippets/update.md)
- [Delete a snippet](https://www.plain.com/docs/graphql/snippets/delete.md)
- [Tasks](https://www.plain.com/docs/graphql/tasks.md)
- [Fetch tasks](https://www.plain.com/docs/graphql/tasks/get.md)
- [Create a task](https://www.plain.com/docs/graphql/tasks/create.md)
- [Update a task](https://www.plain.com/docs/graphql/tasks/update.md)
- [Delete a task](https://www.plain.com/docs/graphql/tasks/delete.md)
- [Notes](https://www.plain.com/docs/graphql/notes.md)
- [Webhook targets](https://www.plain.com/docs/graphql/webhook-targets.md)
- [Fetch webhook targets](https://www.plain.com/docs/graphql/webhook-targets/get.md)
- [Create a webhook target](https://www.plain.com/docs/graphql/webhook-targets/create.md)
- [Update a webhook target](https://www.plain.com/docs/graphql/webhook-targets/update.md)
- [Delete a webhook target](https://www.plain.com/docs/graphql/webhook-targets/delete.md)
- [Inspect delivery attempts](https://www.plain.com/docs/graphql/webhook-targets/delivery-attempts.md)
- [Discussions](https://www.plain.com/docs/graphql/discussions.md)
- [Fetch discussions](https://www.plain.com/docs/graphql/discussions/get.md)
- [Start a discussion](https://www.plain.com/docs/graphql/discussions/create.md)
- [Send a discussion message](https://www.plain.com/docs/graphql/discussions/send-message.md)
- [Help center](https://www.plain.com/docs/graphql/help-center.md)
- [Fetch help centers and articles](https://www.plain.com/docs/graphql/help-center/get.md)
- [Manage articles](https://www.plain.com/docs/graphql/help-center/manage-articles.md)
- [Manage article groups](https://www.plain.com/docs/graphql/help-center/manage-article-groups.md)
- [Manage the navigation](https://www.plain.com/docs/graphql/help-center/navigation.md)
- [Attachments](https://www.plain.com/docs/graphql/attachments.md): How to upload attachments programmatically for messages and events in Plain.
- [API Explorer](https://www.plain.com/docs/graphql/api-explorer.md)
- [GraphQL SDK](https://www.plain.com/docs/graphql/sdk.md): A typed SDK for Plain's GraphQL API, auto-generated from the schema.
- [Building Agents on Plain](https://www.plain.com/docs/agents.md)
- [Machine users](https://www.plain.com/docs/agents/machine-users.md): Set up your agent's identity in Plain.
- [Receiving events](https://www.plain.com/docs/agents/receiving-events.md): Listen for thread and message events with webhooks.
- [Routing to your agent](https://www.plain.com/docs/agents/routing.md): Decide which threads your agent should act on.
- [Reading threads](https://www.plain.com/docs/agents/reading-threads.md): Fetch thread context for your agent to act on.
- [Searching knowledge](https://www.plain.com/docs/agents/searching-knowledge.md): Give your agent answers from your help center and indexed documents.
- [Acting on threads](https://www.plain.com/docs/agents/acting-on-threads.md): The actions your agent can take on a thread.
- [Webhooks](https://www.plain.com/docs/webhooks.md)
- [Webhook Versions](https://www.plain.com/docs/webhooks/versions.md)
- [Thread created](https://www.plain.com/docs/webhooks/thread-created.md)
- [Thread status transitioned](https://www.plain.com/docs/webhooks/thread-status-transitioned.md)
- [Thread assignment transitioned](https://www.plain.com/docs/webhooks/thread-assignment-transitioned.md)
- [Thread labels changed](https://www.plain.com/docs/webhooks/thread-labels-changed.md)
- [Thread priority changed](https://www.plain.com/docs/webhooks/thread-priority-changed.md)
- [Note created](https://www.plain.com/docs/webhooks/thread-note-created.md)
- [Email received](https://www.plain.com/docs/webhooks/thread-email-received.md)
- [Email sent](https://www.plain.com/docs/webhooks/thread-email-sent.md)
- [Slack message received](https://www.plain.com/docs/webhooks/thread-slack-message-received.md)
- [Slack message sent](https://www.plain.com/docs/webhooks/thread-slack-message-sent.md)
- [Chat sent](https://www.plain.com/docs/webhooks/thread-chat-sent.md)
- [Chat received](https://www.plain.com/docs/webhooks/thread-chat-received.md)
- [Thread Field created](https://www.plain.com/docs/webhooks/thread-field-created.md)
- [Thread Field updated](https://www.plain.com/docs/webhooks/thread-field-updated.md)
- [Thread Field deleted](https://www.plain.com/docs/webhooks/thread-field-deleted.md)
- [Thread SLA status transitioned](https://www.plain.com/docs/webhooks/thread-service-level-agreement-status-transitioned.md)
- [Customer created](https://www.plain.com/docs/webhooks/customer-created.md)
- [Customer updated](https://www.plain.com/docs/webhooks/customer-updated.md)
- [Customer deleted](https://www.plain.com/docs/webhooks/customer-deleted.md)
- [Customer Group Membership Changed Event](https://www.plain.com/docs/webhooks/customer-group-membership-changed.md)
- [Webhooks SDK](https://www.plain.com/docs/webhooks/sdk.md): Webhook parsing and signature verification for Plain webhooks.
- [Customer cards](https://www.plain.com/docs/customer-cards.md): Live context straight from your own systems when helping customers.
- [Create a customer card](https://www.plain.com/docs/customer-cards/create-a-customer-card.md): Define the details of the customer card.
- [Protocol](https://www.plain.com/docs/customer-cards/protocol.md): Learn how we request customer cards from your API and how to respond to these requests.
- [Playground](https://www.plain.com/docs/customer-cards/playground.md)
- [Examples](https://www.plain.com/docs/customer-cards/examples.md)
- [UI Components](https://www.plain.com/docs/ui-components.md)
- [Badge](https://www.plain.com/docs/ui-components/badge.md): Useful for statuses or when you need to attract attention to something.
- [Container](https://www.plain.com/docs/ui-components/container.md): Useful when you need to create a bit of structure.
- [CopyButton](https://www.plain.com/docs/ui-components/copy-button.md): Useful if you have any IDs or other details you want to copy for use in messages or outside of Plain.
- [Divider](https://www.plain.com/docs/ui-components/divider.md): Useful when you need a bit of structure.
- [LinkButton](https://www.plain.com/docs/ui-components/link-button.md): Useful when you want to link somewhere external (e.g. your own admin tool or payment provider)
- [WorkflowButton](https://www.plain.com/docs/ui-components/workflow-button.md): Useful when you want to let agents trigger a workflow directly from a customer card
- [PlainText](https://www.plain.com/docs/ui-components/plain-text.md): Useful when you want to show any text that should not have any formatting (is not Markdown). If you want markdown please use [Text](/ui-components/text).
- [Row](https://www.plain.com/docs/ui-components/row.md): Useful when you need to show two things next to each-other.
- [Spacer](https://www.plain.com/docs/ui-components/spacer.md)
- [Text](https://www.plain.com/docs/ui-components/text.md)
- [UI Components SDK](https://www.plain.com/docs/ui-components/sdk.md): Helper functions for building Plain UI components with full type safety.
- [Request signing](https://www.plain.com/docs/request-signing.md)
- [mTLS](https://www.plain.com/docs/mtls.md)