Skip to content
Skip to main content

Nylas Node.js SDK v8.1.0

sdksnode
  • Agent Accounts SDK support — Three new top-level resources cover the Agent Accounts admin surface end-to-end:

    • nylas.policieslist, find, create, update, destroy for Policies that define attachment limits, retention, spam settings, and linked rules.
    • nylas.ruleslist, find, create, update, destroy, plus listEvaluations({ identifier }) for the per-grant rule-evaluations audit trail.
    • nylas.listslist, find, create, update, destroy, plus listItems, addItems, removeItems for the Lists that rules reference with the in_list operator.
  • Provision Agent Accounts through customAuthenticationnylas.auth.customAuthentication() now accepts the new provider: 'nylas' variant and a typed CreateAgentAccountSettings payload (email, optional policyId, optional appPassword). Use it to create a Nylas-hosted mailbox on a domain you’ve registered with Nylas — no OAuth refresh token required. See Bring Your Own Authentication.

  • Large attachment upload sessions — Two new methods on nylas.attachments implement the resumable upload flow for attachments up to 150 MB on Microsoft grants:

    • createUploadSession({ identifier, requestBody }) returns a pre-signed Google Cloud Storage URL that you PUT the file bytes to directly.
    • completeUploadSession({ identifier, attachmentId }) finalizes the upload after the file has been transferred. Once complete, reference the attachmentId in any send or draft request via attachments: [{ id: attachmentId }].

    Sessions expire one hour after creation, so plan your send to occur inside that window. See Send large attachments for the full four-step flow with code samples.

If you’re building agentic email and calendar workflows, you can now manage every part of the Agent Accounts admin contract — policies, rules, lists, and provisioning — with typed SDK methods instead of hand-rolled HTTP calls. And if you’ve been blocked on the 3 MB JSON or 25 MB multipart limit for sending attachments, the new upload-session methods unlock 150 MB attachments on Microsoft mailboxes through a clean two-call pattern.