Role
import { buildClient } from '@datocms/cma-client-node';async function run() {const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });const siteInvitation = await client.siteInvitations.create({email: 'mark.smith@example.com',role: {type: 'role',id: '34'}});console.log(siteInvitation);}run();
{id: '312',email: 'mark.smith@example.com',expired: 'mark.smith@example.com',invitation_link: 'https://dashboard.datocms.com/join-site?email=my-email%40datocms.comff&id=43796&preference=signup&token=xxx',role: {type: 'role',id: '34'}}