Send a message
The authorisation header is an API key that is encoded using JSON Web Tokens. You must include an authorisation header.
JSON Web Tokens have a standard header and a payload. The header consists of:
{
"type":"JWT",
"alg":"HS256"
}
The payload consists of:
{
"iss": "26785a09-ab16-4eb0-8407-a37497a57506",
"iat": 1568818578
}
JSON Web Tokens are encoded using a secret key with the following format: 3d844edf-8d35-48ac-975b-e847b4f122b0
That secret key forms a part of your API key, which follows the format
{key_name}-{iss-uuid}-{secret-key-uuid}.
For example, if your API key is
my_test_key-26785a09-ab16-4eb0-8407-a37497a57506-3d844edf-8d35-48ac-975b-e847b4f122b0:
- your API key name is
my_test_key - your iss (your service id) is
26785a09-ab16-4eb0-8407-a37497a57506 - your secret key is
3d844edf-8d35-48ac-975b-e847b4f122b0
iat (issued at) is the current time in UTC in epoch seconds. The token expires within 30 seconds of the current time.
Refer to the JSON Web Tokens website for more information on encoding your authorisation header.
When you have an encoded and signed token, add that token to a header as follows:
"Authorization": "Bearer encoded_jwt_token"
The Send Text Message Request Payload
The phone number of the recipient of the text message. This can be a NL or international number.
+447900900123To find the template ID:
- Sign in to NotifyNL.
- Go to the Templates page and select the relevant template.
- Select Copy template ID to clipboard.
f33517ff-2a88-4f6e-b855-c550268ce08aYou can leave out this argument if you do not have a reference. An identifier you can create if necessary. This reference identifies a single notification or a batch of notifications. It must not contain any personal information such as name or postal address.
STRINGA unique identifier of the sender of the text message notification. To find the text message sender:
- Sign in to NotifyNL.
- Go to the Settings page.
- In the Text Messages section, select Manage on the Text Message sender row.
You can then either:
- copy the sender ID that you want to use and paste it into the method
- select Change to change the default sender that the service will use, and select Save
You can leave out this argument if your service only has one text message sender, or if you want to use the default sender.
8e222534-7f05-4972-86e3-17c5d9f894e2Created
Bad request. Check the message in the response to find out why your request failed.
Auth error. Check the message in the response to find out why your request failed.
Rate or service limit error. Check the message in the response to find out why your request failed.
Internal server error. Check the message in the response to find out why your request failed.
The authorisation header is an API key that is encoded using JSON Web Tokens. You must include an authorisation header.
JSON Web Tokens have a standard header and a payload. The header consists of:
{
"type":"JWT",
"alg":"HS256"
}
The payload consists of:
{
"iss": "26785a09-ab16-4eb0-8407-a37497a57506",
"iat": 1568818578
}
JSON Web Tokens are encoded using a secret key with the following format: 3d844edf-8d35-48ac-975b-e847b4f122b0
That secret key forms a part of your API key, which follows the format
{key_name}-{iss-uuid}-{secret-key-uuid}.
For example, if your API key is
my_test_key-26785a09-ab16-4eb0-8407-a37497a57506-3d844edf-8d35-48ac-975b-e847b4f122b0:
- your API key name is
my_test_key - your iss (your service id) is
26785a09-ab16-4eb0-8407-a37497a57506 - your secret key is
3d844edf-8d35-48ac-975b-e847b4f122b0
iat (issued at) is the current time in UTC in epoch seconds. The token expires within 30 seconds of the current time.
Refer to the JSON Web Tokens website for more information on encoding your authorisation header.
When you have an encoded and signed token, add that token to a header as follows:
"Authorization": "Bearer encoded_jwt_token"
The Send Email Request Payload
The email address of the recipient.
[email protected]To find the template ID:
- Sign in to NotifyNL.
- Go to the Templates page and select the relevant template.
- Select Copy template ID to clipboard.
f33517ff-2a88-4f6e-b855-c550268ce08aYou can leave out this argument if the email being sent is not a subscription email.
If you send subscription emails you must let recipients opt out of receiving them. Read our Using Notify page for more information about unsubscribe links.
The one-click unsubscribe URL will be added to the headers of your email. Email clients will use it to add an unsubscribe button.
The one-click unsubscribe URL must respond to an empty POST request by unsubscribing the user from your emails. You can include query parameters to help you identify the user.
Your unsubscribe URL and response must comply with the guidance specified in Section 3.1 of IETF RFC 8058.
Unsubscribe link at the bottom of the email (recommended)
To add an unsubscribe link at the bottom of your email, use square brackets around the link text and round brackets around the URL. Make sure there are no spaces between the brackets or the link will not work.
Use this example if you have a webpage for users to manage their email subscriptions:
[Unsubscribe](https://www.example.gov.uk/unsubscribe)
Your webpage should ask the recipients to confirm that they want to unsubscribe.
If you do not have your own webpage, you can add a ‘mailto’ link to let users send an email to your team instead. For example:
[Unsubscribe](mailto:[email protected]?subject=unsubscribe)
The email address should be a shared inbox managed by your team, not your own email address.
https://example.com/unsubscribe.html?opaque=123456789You can leave out this argument if you do not have a reference.
An identifier you can create if necessary. This reference identifies a single notification or a batch of notifications. It must not contain any personal information such as name or postal address.
STRINGYou can leave out this argument if your service only has one reply-to email address, or you want to use the default email address.
This is an email address specified by you to receive replies from your users. You must add at least one reply-to email address before your service can go live.
To add a reply-to email address:
- Sign in to NotifyNL.
- Go to the Settings page.
- In the Email section, select Manage on the Reply-to email addresses row.
- Select Add reply-to address.
- Enter the email address you want to use, and select Add.
STRINGCreated
Bad request. Check the message in the response to find out why your request failed.
Auth error. Check the message in the response to find out why your request failed.
Rate or service limit error. Check the message in the response to find out why your request failed.
Internal server error. Check the message in the response to find out why your request failed.
The authorisation header is an API key that is encoded using JSON Web Tokens. You must include an authorisation header.
JSON Web Tokens have a standard header and a payload. The header consists of:
{
"type":"JWT",
"alg":"HS256"
}
The payload consists of:
{
"iss": "26785a09-ab16-4eb0-8407-a37497a57506",
"iat": 1568818578
}
JSON Web Tokens are encoded using a secret key with the following format: 3d844edf-8d35-48ac-975b-e847b4f122b0
That secret key forms a part of your API key, which follows the format
{key_name}-{iss-uuid}-{secret-key-uuid}.
For example, if your API key is
my_test_key-26785a09-ab16-4eb0-8407-a37497a57506-3d844edf-8d35-48ac-975b-e847b4f122b0:
- your API key name is
my_test_key - your iss (your service id) is
26785a09-ab16-4eb0-8407-a37497a57506 - your secret key is
3d844edf-8d35-48ac-975b-e847b4f122b0
iat (issued at) is the current time in UTC in epoch seconds. The token expires within 30 seconds of the current time.
Refer to the JSON Web Tokens website for more information on encoding your authorisation header.
When you have an encoded and signed token, add that token to a header as follows:
"Authorization": "Bearer encoded_jwt_token"
Created
Bad request. Check the message in the response to find out why your request failed.
Auth error. Check the message in the response to find out why your request failed.
Rate or service limit error. Check the message in the response to find out why your request failed.
Last updated