Get a template

Get a template

Get all templates

get

This returns the latest version of all templates.

Authorizations
AuthorizationstringRequired

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"
Query parameters
typestring · enumOptional

If you leave out this argument, the method returns all templates. Otherwise you can filter by: email, sms, letter

Example: {"summary":"type=sms","description":"Show templates of type SMS","value":"sms"}Possible values:
Responses
chevron-right
200

If the request is successful, the response body is json and the status code is 200

application/json

If the request is successful, the response body is json and the status code is 200

get
/v2/templates

Get template by ID

get

This returns the latest version of the template.

Authorizations
AuthorizationstringRequired

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"
Path parameters
template_idstringRequired

The ID of the template. Sign in to NotifyNL and go to the Templates page to find it.

Example: b7a59abd-0ab2-4538-b619-8da9f9089e08
Responses
chevron-right
200

If the request is successful, the response body is json and the status code is 200

application/json
idstringOptional

required string - template ID

Example: f33517ff-2a88-4f6e-b855-c550268ce08a
namestringOptional

required string - template name

Example: Test template
typestring · enumOptional

required string

Example: smsPossible values:
created_atstringOptional

required string - date and time template created

Example: 2024-08-12T10:40:20.000000Z
updated_atstringOptional

required string - date and time template last updated

Example: 2024-08-12T10:45:47.890097Z
versionintegerOptionalExample: 3
created_bystringOptional

required string

Example: [email protected]
bodystringOptional

required string - body of notification

Example: Hi ((firstname)), We have received your letter dated ((date)). No further action is required.
subjectstring · nullableOptional

required string for email - subject of email, otherwise null

Example: Test
postagestring · enum · nullableOptional

required string for letter - postage type, otherwise null

Example: secondPossible values:
personalisationobjectOptional

object containaing personalisation parameters - empty if no personalisation in the template

Example: {"date":{"required":true},"firstname":{"required":true}}
letter_contact_blockstring · nullableOptional

optional string - null if not a letter template or contact block not set

get
/v2/template/{template_id}

Get template by ID and version

get

This returns the latest version of the template.

Authorizations
AuthorizationstringRequired

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"
Path parameters
template_idstringRequired

The ID of the template. Sign in to NotifyNL and go to the Templates page to find it.

Example: b7a59abd-0ab2-4538-b619-8da9f9089e08
versionintegerRequired

The version number of the template.

Example: 1
Responses
chevron-right
200

If the request is successful, the response body is json and the status code is 200

application/json
idstringOptional

required string - template ID

Example: f33517ff-2a88-4f6e-b855-c550268ce08a
namestringOptional

required string - template name

Example: Test template
typestring · enumOptional

required string

Example: smsPossible values:
created_atstringOptional

required string - date and time template created

Example: 2024-08-12T10:40:20.000000Z
updated_atstringOptional

required string - date and time template last updated

Example: 2024-08-12T10:45:47.890097Z
versionintegerOptionalExample: 3
created_bystringOptional

required string

Example: [email protected]
bodystringOptional

required string - body of notification

Example: Hi ((firstname)), We have received your letter dated ((date)). No further action is required.
subjectstring · nullableOptional

required string for email - subject of email, otherwise null

Example: Test
postagestring · enum · nullableOptional

required string for letter - postage type, otherwise null

Example: secondPossible values:
personalisationobjectOptional

object containaing personalisation parameters - empty if no personalisation in the template

Example: {"date":{"required":true},"firstname":{"required":true}}
letter_contact_blockstring · nullableOptional

optional string - null if not a letter template or contact block not set

get
/v2/template/{template_id}/version/{version}

Generate a preview template

post

This generates a preview version of a template.

Authorizations
AuthorizationstringRequired

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"
Path parameters
template_idstringRequired

The ID of the template. Sign in to NotifyNL and go to the Templates page to find it.

Example: b7a59abd-0ab2-4538-b619-8da9f9089e08
Body

If a template has placeholder fields for personalised information such as name or reference number, you need to provide their values in a dictionary with key value pairs.

Responses
chevron-right
200

Created

application/json

If the request is successful, the response body is json and the status code is 200

idstringOptionalExample: b7a59abd-0ab2-4538-b619-8da9f9089e08
typestring · enumOptional

required string

Example: smsPossible values:
versionintegerOptionalExample: 2
bodystringOptional

required string - body of notification

Example: Hi Amala, We have received your letter dated 19/08/2024. No further action is required.
htmlstring · nullableOptional

html representation of the notification to be sent - null for sms

subjectstring · nullableOptional

required string for email - subject of email, otherwise null

postagestring · nullableOptional

required string for letter - postage type, otherwise null

post
/v2/template/{template_id}/preview

Last updated