Workspaces no longer need an email domain. Until now, every workspace belonged to one domain. That didn’t work when one customer’s users signed in from several domains or from personal addresses. You can now create a workspace with only a name and assign any grants you want to it.
Changed
Section titled “Changed”-
domainis optional on Create a workspace. The request now needs only aname. A workspace created without a domain returnsdomainasnull.curl --request POST \--url "https://api.us.nylas.com/v3/workspaces" \--header 'Authorization: Bearer <NYLAS_API_KEY>' \--header 'Content-Type: application/json' \--data '{ "name": "Acme Corp" }' -
Manual assignment doesn’t check email domains. Update workspace assignments and the
workspace_idfield on Update a grant let you assign any grant in the application to any workspace. That includes grants from other domains and grants without an email address, such as virtual calendars. -
auto_groupdefaults tofalse. A workspace only picks up new grants automatically when you setauto_grouptotrueand give it adomain. Settingauto_grouptotrueon a workspace without a domain returns a 400 error.
Good to know
Section titled “Good to know”-
You can’t add a domain to an existing workspace. If you later want automatic grouping, create a new workspace with a
domain. -
You can’t remove a grant from a workspace with a grant update, because Nylas ignores
"workspace_id": null. Send the grant ID inremove_grantsto Update workspace assignments instead. The grant then has no workspace until you assign it to one or the automatic grouping job picks it up.curl --request POST \--url "https://api.us.nylas.com/v3/workspaces/<WORKSPACE_ID>/manual-assign" \--header 'Authorization: Bearer <NYLAS_API_KEY>' \--header 'Content-Type: application/json' \--data '{ "remove_grants": ["<NYLAS_GRANT_ID>"] }'
How workspaces group grants covers creating workspaces, moving grants, and filtering the grant list by workspace.