plain.api.* operation is listed below with parameter shapes and return types from the plugin Zod schemas.
Companies
fetch
companies.fetch
Fetch a company by ID.
Risk: read
company full type
company full type
update
companies.update
Create or update a company by ID or domain.
Risk: write
identifier full type
identifier full type
company full type
company full type
Customer Groups
addCustomer
customerGroups.addCustomer
Add a customer to one or more customer groups.
Risk: write
customerGroupIdentifiers full type
customerGroupIdentifiers full type
customerGroupMemberships full type
customerGroupMemberships full type
create
customerGroups.create
Create a customer group.
Risk: write
customerGroup full type
customerGroup full type
list
customerGroups.list
List customer groups with cursor pagination.
Risk: read
filters full type
filters full type
customerGroups full type
customerGroups full type
pageInfo full type
pageInfo full type
removeCustomer
customerGroups.removeCustomer
Remove a customer from one or more customer groups.
Risk: write
customerGroupIdentifiers full type
customerGroupIdentifiers full type
Customers
delete
customers.delete
Delete a customer asynchronously.
Risk: write
getByEmail
customers.getByEmail
Fetch a customer by email address.
Risk: read
customer full type
customer full type
getById
customers.getById
Fetch a customer by Plain customer ID.
Risk: read
customer full type
customer full type
list
customers.list
List customers with optional filters and cursor pagination (first/after or last/before).
Risk: read
filters full type
filters full type
sortBy full type
sortBy full type
customers full type
customers full type
pageInfo full type
pageInfo full type
upsert
customers.upsert
Create or update a customer by identifier.
Risk: write
identifier full type
identifier full type
onCreate full type
onCreate full type
onUpdate full type
onUpdate full type
customer full type
customer full type
Graphql
run
graphql.run
Run an arbitrary GraphQL query or mutation.
Risk: write
variables full type
variables full type
lazy
Threads
create
threads.create
Create a thread for a customer.
Risk: write
customerIdentifier full type
customerIdentifier full type
threadFields full type
threadFields full type
assignedTo full type
assignedTo full type
tenantIdentifier full type
tenantIdentifier full type
thread full type
thread full type
fetchIssues
threads.fetchIssues
Fetch external thread links for a customer and flatten as issue records.
Risk: read
issues full type
issues full type
pageInfo full type
pageInfo full type
getById
threads.getById
Fetch a thread by Plain thread ID.
Risk: read
thread full type
thread full type
listDeprecated
threads.listDeprecated
Deprecated threads listing operation; use threads.query.
Risk: read
filters full type
filters full type
sortBy full type
sortBy full type
threads full type
threads full type
pageInfo full type
pageInfo full type
query
threads.query
List threads with filters, sort, and cursor pagination.
Risk: read
filters full type
filters full type
sortBy full type
sortBy full type
threads full type
threads full type
pageInfo full type
pageInfo full type
sendMessage
threads.sendMessage
Reply to a thread via Plain routing.
Risk: write
impersonation full type
impersonation full type
update
threads.update
Update a thread title.
Risk: write
thread full type
thread full type
Tiers
fetch
tiers.fetch
Fetch a tier by ID.
Risk: read
tier full type
tier full type
list
tiers.list
List tiers with cursor pagination.
Risk: read
tiers full type
tiers full type
pageInfo full type
pageInfo full type
Users
delete
users.delete
Delete a workspace user.
Risk: write
getById
users.getById
Fetch a workspace user by ID.
Risk: read
user full type
user full type