NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #2662 most downloaded on npm
GOV.UK Notify Node.js client
Last release 26 days ago
08 Sep 2026
Ships unpredictably
gaps range from 8 days to 1.5 years
Nearly every release is documented
notes for 46 of 48 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
48 releases · first in 2016
Add personalisation to template response types from getTemplateById, getTemplateByIdAndVersion and getAllTemplates. This is an object of placeholder n
personalisation to template response types from getTemplateById, getTemplateByIdAndVersion and getAllTemplates. This is an object of placeholder names, for example {"name": {"required": true}}.The sendEmail function can now be passed santiseContentFor as an optional argument.
sendEmail function can now be passed santiseContentFor as an optional argument.One column per quarter.
Include type files in published package (previous attempt did not work)
Include type files in published package
Adds Typescript hints (run npm build:types to generate type files in types/)
npm build:types to generate type files in types/)Fix a bug where an internal API client function isn't being exposed in the library.
Add support for providing a custom underlying Axios client via setClient.
setClient.The sendEmail function can now be passed oneClickUnsubscribeURL as an optional argument.
sendEmail function can now be passed oneClickUnsubscribeURL as an optional argument.Remove the default is_csv boolean parameter from prepareUpload. This method now accepts a file and an options map with the following options. For more
is_csv boolean parameter from prepareUpload. This method now accepts a file and an options map with the following options. For more specific information please read the documentation.
filename (string) - specify the document's filename upon downloadconfirm_email_before_download (boolean) - require the user to enter their email address before the file can be downloaded.retention_period (string) - how long Notify should make the file available to the user for.* Bump axios from 1.2.6 to 1.6.1
Fix a few cases of assignment to undeclared (global) variables
Bump axios to the 1.x branch to address CVE-2023-45857. Due to underlying changes in Axios you may have to explicitly set the protocol property when c…
protocol property when constructing your proxyConfig object, if using a proxy.Bump word-wrap from 1.2.3 to 1.2.4 to address CVE-2023-26115.
Bump semver from 5.7.1 to 5.7.2
Fix a bug with default behaviour for confirmEmailBeforeDownload, which coalesced false to null.
confirmEmailBeforeDownload, which coalesced false to null.Remove support for node versions below v14.17.3.
Bump jsonwebtokens from 8.5.1 to 9.0.0 to mitigate CVE-2022-23529. We don't believe this CVE affects any use-cases of notifications-node-client; this…
Bump follow-redirects from 1.14.7 to 1.15.2
Upgrade ansi-regex dependencies to mitigate CVE-2021-3807.
Support strings in calls to prepareUpload. fs.readFile can return strings if an encoding is provided, and the client didn't handle these correctly.
prepareUpload. fs.readFile can return strings if an encoding is provided, and the client didn't handle these correctly.Add support for new security features when sending a file by email:
Add support for new security features when sending a file by email:
confirmEmailBeforeDownload can be set to true to require the user to enter their email address before accessing the file.retentionPeriod can be set to <1-78> weeks to set how long the file should be made available.The isCsv parameter to prepareUpload has now been replaced by an options parameter. The implementation has been done in a backwards-compatible way, so if you are just sending true/false values as the seecond parameter, that will continue to work. Though we still recommend updating to use the new options format.
Remove underscore.js dependencyr new send a file features)
Remove underscore.js dependencyr new send a file features)
Upgrade axios version from ^0.21.1 to ^0.25.0
Upgrade axios version from ^0.21.1 to ^0.25.0
Upgrade axios version from 0.19.2 to 0.21.1
Correct incorrect description of parameter to be used by NotifyClient.setProxy
Correct incorrect description of parameter to be used by NotifyClient.setProxy
Remove unintentional global nature of variable version
Remove unintentional global nature of variable version
…has been deprecated. This makes the following breaking changes:
We have replaced the use of the npm request-promise package with axios as the npm request package has been deprecated. This makes the following breaking changes:
The response object returned by a successful API call is now in the form of an axios response. This has a different interface to a request response. For example:
response.body becomes response.dataresponse.statusCode becomes response.statusThe err object returned by an unsuccessful API call has a different interface. For example, err.error becomes err.response.data. See the axios documentation for further details on error handling.
To configure the use of a proxy you should pass the proxy configuration as an object rather than a URL. For details, see the axios client.
We now return native promises rather than bluebird promises. You will not need to make any changes unless you are using some of the additional methods found on bluebird promises that do not exist on native promises.
Added letter_contact_block to the responses for getTemplateById, getTemplateByIdAndVersion and getAllTemplates.
letter_contact_block to the responses for getTemplateById, getTemplateByIdAndVersion and getAllTemplates.Add support for an optional isCsv parameter in the prepareUpload function. This fixes a bug when sending a CSV file by email. This ensures that the fi
isCsv parameter in the prepareUpload function. This fixes a bug when sending a CSV file by email. This ensures that the file is downloaded as a CSV rather than a TXT file.Remove __dirname global call from api client
__dirname global call from api client### Changed * Add homepage to package.json
Refer to files, not documents, in error messages
Add notifyClient.getPdfForLetterNotification(notificationId)
notifyClient.getPdfForLetterNotification(notificationId)
Added an optional postage argument to sendPrecompiledLetter
sendPrecompiledLetterMoved documentation to https://docs.notifications.service.gov.uk/node.html (generated from DOCUMENTATION.md)
Made formatting consistent across documentation.
Added a function to send precompiled letter through the client.
Added instructions for uploading a document to be linked to from an email notification.
prepareUpload as a part of this development. This function encodes the document that is to be uploaded with base64 and returns a dictionary with prepared document as a value (the way our API is prepared to receive it). It also checks if the provided file is not larger than 2MB. The function throws an error if the file is too big.Added name to the response for getTemplateById() and getTemplateByIdAndVersion()
name to the response for getTemplateById() and getTemplateByIdAndVersion()
Added created_by_name to the response for .getNotificationById() and .getNotifications():
created_by_name to the response for .getNotificationById() and .getNotifications():
null.getReceivedTexts - get one page of text messages (250) per call
getReceivedTexts - get one page of text messages (250) per callUpdated sendSms, sendEmail and sendLetter to take an options object as a parameter.
sendSms, sendEmail and sendLetter to take an options object as a parameter.
personalisation, reference, smsSenderId and emailReplyToId now need to be passed to these functions inside options.Crypto dependencyUpdated sendSms method with optional argument:
sendSms method with optional argument:
smsSenderId - specify the identifier of the sms sender (optional)setProxy(proxyUrl) - specify the URL of a proxy for the client to use (optional)
setProxy(proxyUrl) - specify the URL of a proxy for the client to use (optional)Added new methods for managing templates:
Added new methods for managing templates:
getTemplateById - retrieve a single templategetTemplateByIdAndVersion - retrieve a specific version for a desired templategetAllTemplates - retrieve all templates (can filter by type)previewTemplateById - preview a template with personalisation appliedUpdate README to describe how to catch errors
Using v2 of the notification-api.
Using v2 of the notification-api.
Update to notifyClient.sendSms():
reference: an optional identifier you generate if you don’t want to use Notify’s id. It can be used to identify a single notification or a batch of notifications.notifyClient.sendSms(templateId, phoneNumber, personalisation, reference);
* Where `personalisation` and `reference` can be `undefined`.
notifyClient.sendEmail():
reference: an optional identifier you generate if you don’t want to use Notify’s id. It can be used to identify a single notification or a batch of notifications.notifyClient.sendEmail(templateId, emailAddress, personalisation, reference);
* Where `personalisation` and `reference` can be `undefined`.
NotificationClient.getAllNotifications()
reference and olderThanId, see the README for details.notifyClient.getNotifications(templateType, status, reference, olderThanId);
* Each one of these parameters can be `undefined`
Changelog not recorded - please see pull requests on github.
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →