API access

Our APIs are already publicly available, since our support app and chat widget need them. But a public API does not mean that it is ready to be consumed programmatically. If we want people to use it, we need to offer a fantastic developer experience — from documentation and naming consistency to developer tooling.

Here come the robots machine users 🤖

Recently, we've been preparing to open up access to our Core API to all our customers.

Internally, Plain uses a fine-grained permission-based access control. Every authenticated user in our system has a number of roles, which allow them to perform different actions based on those roles’ permissions.

These roles are modelled after the different user types that can exist in Plain, for example customer service agent or workspace admin.

With our Core API, we want to give you the building blocks to fully customise how you provide customer service. And to interact with this API, we have added a new type of user.

A machine user is just another user in our system. There is nothing special about them, except for the way they authenticate and how we grant permissions to them.

Creating a machine user
Creating a machine user

Instead of obtaining a JWT after an OAuth exchange, machine users authenticate with an API key. These API keys consist of a secret payload, which you use as a bearer token, and a set of permissions. Unlike normal users that use roles, machine users and their API keys give full control over which exact permissions you need.

Creating a new API key

All of the actions you do with a given API key will be attributed to that key’s machine user. This is a really powerful feature as it means that machine users can do things like send emails, open/close issues, create notes, etc. They will show up nicely in a customer’s timeline, just like any other user!

Other improvements and bug fixes

  • 💅 We’ve added support for rich text (via markdown) in the customer timeline. For now, this means that inbound emails will retain most formatting (emphasis, numbered lists, links, etc)
  • 📧 BCC/CC email recipients support: you can now include additional recipients in your emails. We’ve also enhanced how these show up in the timeline
  • 🗑 We are now dropping ‘Out of Office’ emails to your support email address, removing unnecessary noise from your workspace
  • 💨 Several tweaks across our stack to make the support app snappier: from fixing rendering issues in our Support App to making infrastructure changes to lower API response times.
  • #changelog
© Plain. CS without the BS since 2020.
plain.com