Using Plain's API
Plain’s API gives your team access to the same powerful tools our own product is built on. Whether you want to connect customer data, build automations, or extend your workflows, Plain’s API makes it possible.
This guide will walk you through the basics of Plain's API and what you’ll need to get started.
If you are new to GraphQL, Apollo has resources for beginners. The official GraphQL documentation is another good starting point.
What you’ll need to get started
Here’s what someone on your team will need to get started with our API:
Your API key: This gives your system permission to talk to Plain. You can generate one from your Plain workspace settings.
A GraphQL client or script: Your team might use a tool like Postman, curl, or a GraphQL IDE.
The API endpoint:
URL:
https://core-api.uk.plain.com/graphql/v1
Basic headers (for every request):
Content-Type: application/json
Authorization: Bearer YOUR_TOKEN
The GraphQL schema (optional):
Your team can download it here:
https://core-api.uk.plain.com/graphql/v1/schema.graphql
What kind of things can you do with it?
Here are some examples of what your team can build using Plain’s API:
Pull a list of your customers and display it in another internal tool
Upsert customer records into Plain from your product
Pull core details like usage, billing info, plan type into Customer Cards
Automatically create a note or label a customer thread when a status changes in your CRM
Fetch conversation data for reporting in tools like Retool or Looker
A great way to explore what you can use our API for is to open our API explorer (which requires setting up a Plain workspace).
Making your first API call
Here’s a real-world example a developer might start with:
“Find a customer in Plain using their email address.”
To do this, they’ll need:
An API key with the
customer:read
permissionThe email address of the customer (which you can find on the right-hand side of their thread in Plain)
They can test it using curl, or our TypeScript SDK – whatever their preferred tools are.
Not sure where to start?
If you're curious about how Plain’s API could work for your team, or you want help scoping a specific use case, just reach out to us. We’re happy to walk through ideas, examples, or even build with you.