Plain
B2B support (GraphQL): threads, customers, labels and notes
Managed auth
Authentication
Methods your end users can connect with. Credentials are stored encrypted, and secret values are never shown again or returned by the API.
API key
Your users enter
- API key (plainApiKey_…)SecretRequired
Where to find them
- In Plain, open “Settings” → “Machine Users” and click “+ Add Machine User” (internal name and public name).
- Inside, click “Add API key”, select only the permissions you need (customer:read, thread:read…) and copy the key: it is not shown again.
- The key can only do what you allow; if a permission is missing, Plain's error says which one.
Tools (2)
Plain API request
PLAIN_SEND_REQUESTAuthenticated call to the Plain API (https://core-api.uk.plain.com). Any endpoint of the API is allowed. This is a GraphQL API: use PLAIN_SEND_GRAPHQL_REQUEST (or POST /graphql/v1 with {"query": "…", "variables": {…}}). Queries: { myWorkspace { id name } }, { customerByEmail(email: "jane@acme.com") { id fullName } }, { threads(first: 10) { edges { node { id title status } } } }, { customers(first: 20) { edges { node { id fullName } } } }. Mutations: upsertCustomer, createThread, replyToThread, markThreadAsDone, createNote, addLabels; each takes an “input”.
Required scopes
No scopes required
Input
Plain API request input Name Type Description methodstringHTTP methodOne of: GET,POST,PUT,PATCH,DELETEDefault:"GET"pathrequiredstringPath relative to the API base URL, or a full URL on the same API (e.g. a next-page link) queryobjectQuery string parameters bodyunknownJSON body formobjectBody as application/x-www-form-urlencoded instead of JSON body_base64stringBinary body, base64 (at most 960000 characters) content_typestringContent-Type of body_base64 headersobjectExtra headers such as Accept. Authentication is added automatically. Plain GraphQL request
PLAIN_SEND_GRAPHQL_REQUESTRuns a GraphQL query or mutation against the Plain API and returns its data and errors.
Required scopes
No scopes required
Input
Plain GraphQL request input Name Type Description queryrequiredstringGraphQL query or mutation variablesobjectGraphQL variables

