Migrating from Namespaces

We’ve put this guide together to help you transition from using deprecated Namespace endpoints in the Nylas API.

Why make this change?

We previously used namespaces as a reference to linked email accounts. In addition to having access to the /n endpoint to get a list of linked accounts, you were requiried to include the namespace id associated with an account in the URI. To simplify the API, we are removing this requirement and associating the linked email account with the credentials you are using.

What’s new?

Endpoint URIs

When accessing resources, you no longer include the namespace id that is associated with the linked account in the URL:

:::xml
GET https://api.nylas.com/n/<namespace_id>/threads

becomes

:::xml
GET https://api.nylas.com/threads

Account objects

The Account has been created to contain attributes previously accessible via namespaces.

:::xml
GET https://api.nylas.com/account

It includes the all the same attributes, except for the namespace_id attribute. The account_id is now the primary identifier that corresponds to the resource. As described in the section below, the new account_id corresponds to the old namespace_id attribute as we are no longer exposing the old namespace account_id attribute.

How long will the namespaces be supported?

Before announcing this change, we’ve worked with existing production customers to begin migrating their applications and found the switch to be surprisingly quick and painless. The full namespaces API will be officially disabled on October 15, 2015.