Tiers
Update company tier
If you want to explicitly set the tier for a company you can do so using this mutation. If instead you want to add many companies to a tier at once, you can use the add members mutation.
For this mutation you need the following permissions:
tierMembership:read
tierMembership:create
import { PlainClient } from '@team-plain/typescript-sdk';
const client = new PlainClient({ apiKey: 'plainApiKey_xxx' });
const res = await client.updateCompanyTier({
companyIdentifier: {
companyDomainName: 'acme.com',
// Or the company id if you prefer
// companyId: 'co_123'
},
tierIdentifier: {
externalId: 'XXX',
// Or the tier id:
// tierId: "tier_123"
},
});
if (res.error) {
console.error(res.error);
} else {
console.log(res.data);
}
Was this page helpful?