You can remove companies and tenants from the tiers they are part of manually in the UI or via the API.
For this mutation you need the following permissions:
tierMembership:read
tierMembership:delete
import { PlainClient } from '@team-plain/typescript-sdk';
const client = new PlainClient({ apiKey: 'plainApiKey_xxx' });
const res = await client.removeMembersFromTier({
memberIdentifiers: [
{
tenantId: 'te_123',
},
{
companyId: 'co_123',
},
],
});
if (res.error) {
console.error(res.error);
} else {
console.log(res.data);
}
import { PlainClient } from '@team-plain/typescript-sdk';
const client = new PlainClient({ apiKey: 'plainApiKey_xxx' });
const res = await client.removeMembersFromTier({
memberIdentifiers: [
{
tenantId: 'te_123',
},
{
companyId: 'co_123',
},
],
});
if (res.error) {
console.error(res.error);
} else {
console.log(res.data);
}
mutation removeMembersFromTier($input: RemoveMembersFromTierInput!) {
removeMembersFromTier(input: $input) {
error {
message
type
code
fields {
field
message
type
}
}
}
}
{
"input": {
"memberIdentifiers": [
{
"tenantId": "te_123"
},
{
"companyId": "co_123"
}
]
}
}