Skip to content
2 changes: 1 addition & 1 deletion openapi/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
},
"link_to_file": {
"type": "object",
"description": "You can leave out this argument if you do not have any file to attach.\n\nTo send a file by email, add a placeholder to the template then upload a file. The placeholder will contain a secure link to download the file.\n\nThe links are unique and unguessable. GOV.UK Notify cannot access or decrypt your file.\n\nYour file will be available to download for a default period of 26 weeks (6 months).\n\nTo help protect your files you can also:\n\n* ask recipients to confirm their email address before downloading\n* choose the length of time that a file is available to download**Add contact details to the file download page**\n\n1. [Sign in to GOV.UK Notify](https://www.notifications.service.gov.uk/sign-in).\n1. Go to the __Settings__ page.\n1. In the __Email__ section, select __Manage__ on the __Send files by email__ row.\n1. Enter the contact details you want to use, and select __Save__. \n\n**Add a placeholder to the template**\n\n1. [Sign in to GOV.UK Notify](https://www.notifications.service.gov.uk/sign-in).\n1. Go to the __Templates__ page and select the relevant email template.\n1. Select __Edit__.\n1. Add a placeholder to the email template using double brackets. For example: 'Download your file at: ((link_to_file))'\n\nYour email should also tell recipients how long the file will be available to download.\n\n**Upload your file**\n\nYou can upload the following file types:\n\n- PDF (.pdf)\n- CSV (.csv)\n- Text (.odt, .txt, .rtf, .json)\n- MS Word Document (.doc, .docx)\n- Ms Excel Spreadsheet (.xlsx)\n\nYour file must be smaller than 2MB. [Contact the GOV.UK Notify team](https://www.notifications.service.gov.uk/support/ask-question-give-feedback) if you need to send other file types.\n\nYou’ll need to convert the file into a string that is base64 encoded.\n\nPass the encoded string into an object with a `file` key, and put that in the personalisation argument.\n\n**Set the filename**\n\nYou should provide a filename when you upload your file.\n\nThe filename should tell the recipient what the file contains. A memorable filename can help the recipient to find the file again later.\n\nThe filename must end with a file extension. For example, `.csv` for a CSV file. If you include the wrong file extension, recipients may not be able to open your file.\n\nThe filename should be no more that 100 characters long\n\nIf you do not provide a filename for your file, Notify will:\n\n* generate a random filename\n* try to add the correct file extension\n\nIf Notify cannot add the correct file extension, recipients may not be able to open your file.\n\n**Ask recipients to confirm their email address before they can download the file**\n\nWhen a recipient clicks the link in the email you’ve sent them, they have to enter their email address. Only someone who knows the recipient’s email address can download the file.\n\nThis security feature is turned on by default.\n\n**Turn off email address check (not recommended)**\n\nIf you do not want to use this feature, you can turn it off on a file-by-file basis.\n\nYou should not turn this feature off if you send files that contain:\n\n* personally identifiable information\n* commercially sensitive information\n* information classified as ‘OFFICIAL’ or ‘OFFICIAL-SENSITIVE’ under the [Government Security Classifications](https://www.gov.uk/government/publications/government-security-classifications) policy\n\nTo let the recipient download the file without confirming their email address, set the `confirm_email_before_download` flag to `false`.\n\n**Choose the length of time that a file is available to download**\n\nSet the number of weeks you want the file to be available using the `retention_period` key.\n\nYou can choose any value between <code>1 week</code> and <code>26 weeks</code>. When deciding this, you should consider:\n\n* the need to protect the recipient’s personal information\n* whether the recipient will need to download the file again later\n\nIf you do not choose a value, the file will be available for the default period of 26 weeks (6 months).\n\nFiles sent before 12 April 2023 had a longer default period of 78 weeks (18 months).",
"description": "You can leave out this argument if you do not have any file to attach.\n\nTo send a file by email, add a placeholder to the template then upload a file. The placeholder will contain a secure link to download the file.\n\nThe links are unique and unguessable. GOV.UK Notify cannot access or decrypt your file.\n\nYour file will be available to download for a default period of 26 weeks (6 months).\n\nTo help protect your files you can also:\n\n* ask recipients to confirm their email address before downloading\n* choose the length of time that a file is available to download**Add contact details to the file download page**\n\n1. [Sign in to GOV.UK Notify](https://www.notifications.service.gov.uk/sign-in).\n1. Go to the __Settings__ page.\n1. In the __Email__ section, select __Manage__ on the __Send files by email__ row.\n1. Enter the contact details you want to use, and select __Save__. \n\n**Add a placeholder to the template**\n\n1. [Sign in to GOV.UK Notify](https://www.notifications.service.gov.uk/sign-in).\n1. Go to the __Templates__ page and select the relevant email template.\n1. Select __Edit__.\n1. Add a placeholder to the email template using double brackets. For example: 'Download your file at: ((link_to_file))'\n\nYour email should also tell recipients how long the file will be available to download.\n\n**Upload your file**\n\nYou can upload the following file types:\n\n- PDF (.pdf)\n- CSV (.csv)\n- Text (.odt, .txt, .rtf, .json)\n- MS Word Document (.doc, .docx)\n- Ms Excel Spreadsheet (.xlsx)\n\nYour file must be smaller than 2MB. [Contact the GOV.UK Notify team](https://www.notifications.service.gov.uk/support/ask-question-give-feedback) if you need to send other file types.\n\nYou’ll need to convert the file into a string that is base64 encoded.\n\nPass the encoded string into an object with a `file` key, and put that in the personalisation argument.\n\n**Set the filename**\n\nYou should provide a filename when you upload your file.\n\nThe filename should tell the recipient what the file contains. A memorable filename can help the recipient to find the file again later.\n\nThe filename must end with a file extension. For example, `.csv` for a CSV file. If you include the wrong file extension, recipients may not be able to open your file.\n\nThe filename should be no more that 100 characters long\n\nIf you do not provide a filename for your file, Notify will:\n\n* generate a random filename\n* try to add the correct file extension\n\nIf Notify cannot add the correct file extension, recipients may not be able to open your file.\n\n**Ask recipients to confirm their email address before they can download the file**\n\nWhen a recipient clicks the link in the email you’ve sent them, they have to enter their email address. Only someone who knows the recipient’s email address can download the file.\n\nThis security feature is turned on by default.\n\n**Turn off email address check (not recommended)**\n\nIf you do not want to use this feature, you can turn it off on a file-by-file basis.\n\nYou should not turn this feature off if you send files that contain:\n\n* personally identifiable information\n* commercially sensitive information\n* information classified as ‘OFFICIAL’ or ‘OFFICIAL-SENSITIVE’ under the [Government Security Classifications](https://www.gov.uk/government/publications/government-security-classifications) policy\n\nTo let the recipient download the file without confirming their email address, set the `confirm_email_before_download` flag to `false`.\n\n**Choose the length of time that a file is available to download**\n\nSet the number of weeks you want the file to be available using the `retention_period` key.\n\nYou can choose any value between <code>1 week</code> and <code>26 weeks</code>. When deciding this, you should consider:\n\n* the need to protect the recipient’s personal information\n* whether the recipient will need to download the file again later\n\nIf you do not choose a value, the file will be available for the default period of 26 weeks (6 months).",
"properties": {
"file": {
"type": "string",
Expand Down
2 changes: 0 additions & 2 deletions source/java.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,6 @@ You can choose any value between 1 week and 78 weeks. When deciding this, you sh

If you do not choose a value, the file will be available for the default period of 26 weeks (6 months).

Files sent before 12 April 2023 had a longer default period of 78 weeks (18 months).

```java
ClassLoader classLoader = getClass().getClassLoader();
File file = new File(classLoader.getResource("document_to_upload.pdf").getFile());
Expand Down
2 changes: 0 additions & 2 deletions source/net.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,6 @@ You can choose any value between 1 week and 78 weeks. When deciding this, you sh

If you do not choose a value, the file will be available for the default period of 26 weeks (6 months).

Files sent before 12 April 2023 had a longer default period of 78 weeks (18 months).

```csharp

byte[] documentContents = File.ReadAllBytes("<file path>");
Expand Down
2 changes: 0 additions & 2 deletions source/node.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -531,8 +531,6 @@ You can choose any value between 1 week and 78 weeks. When deciding this, you sh

If you do not choose a value, the file will be available for the default period of 26 weeks (6 months).

Files sent before 12 April 2023 had a longer default period of 78 weeks (18 months).

```javascript
let fs = require("fs")

Expand Down
2 changes: 0 additions & 2 deletions source/php.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,6 @@ You can choose any value between 1 week and 78 weeks. When deciding this, you sh

If you do not choose a value, the file will be available for the default period of 26 weeks (6 months).

Files sent before 12 April 2023 had a longer default period of 78 weeks (18 months).

```php
try {
$file_data = file_get_contents('/path/to/my/file.pdf');
Expand Down
2 changes: 0 additions & 2 deletions source/python.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,6 @@ You can choose any value between 1 week and 78 weeks. When deciding this, you sh

If you do not choose a value, the file will be available for the default period of 26 weeks (6 months).

Files sent before 12 April 2023 had a longer default period of 78 weeks (18 months).

```python
from notifications_python_client import prepare_upload

Expand Down
2 changes: 0 additions & 2 deletions source/rest-api.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,6 @@ You can choose any value between 1 week and 78 weeks. When deciding this, you sh

If you do not choose a value, the file will be available for the default period of 26 weeks (6 months).

Files sent before 12 April 2023 had a longer default period of 78 weeks (18 months).

```javascript
"personalisation":{
"first_name": "Amala",
Expand Down
2 changes: 0 additions & 2 deletions source/ruby.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,6 @@ You can choose any value between 1 week and 78 weeks. When deciding this, you sh

If you do not choose a value, the file will be available for the default period of 26 weeks (6 months).

Files sent before 12 April 2023 had a longer default period of 78 weeks (18 months).

```ruby
File.open("file.pdf", "rb") do |f|
...
Expand Down
Loading