curl --request POST \
--url https://api.example.com/v2/notifications/email \
--header 'Content-Type: application/json' \
--data '
{
"email_address": "<string>",
"template_id": "<string>",
"personalisation": {},
"reference": "<string>",
"email_reply_to_id": "<string>",
"one_click_unsubscribe_url": "<string>",
"scheduled_for": "<string>"
}
'{
"id": "<string>",
"reference": "<string>",
"content": {
"content.from_email": "<string>",
"content.body": "<string>",
"content.subject": "<string>",
"content.one_click_unsubscribe_url": "<string>"
},
"uri": "<string>",
"template": {
"template.id": "<string>",
"template.version": 123,
"template.uri": "<string>"
},
"scheduled_for": "<string>"
}curl --request POST \
--url https://api.example.com/v2/notifications/email \
--header 'Content-Type: application/json' \
--data '
{
"email_address": "<string>",
"template_id": "<string>",
"personalisation": {},
"reference": "<string>",
"email_reply_to_id": "<string>",
"one_click_unsubscribe_url": "<string>",
"scheduled_for": "<string>"
}
'{
"id": "<string>",
"reference": "<string>",
"content": {
"content.from_email": "<string>",
"content.body": "<string>",
"content.subject": "<string>",
"content.one_click_unsubscribe_url": "<string>"
},
"uri": "<string>",
"template": {
"template.id": "<string>",
"template.version": 123,
"template.uri": "<string>"
},
"scheduled_for": "<string>"
}Send an email notification to an email address.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/alphagov/notifications-api/llms.txt
Use this file to discover all available pages before exploring further.
file: Base64 encoded file content (required)is_csv: Boolean indicating if the file is a CSV (optional, mutually exclusive with filename)filename: Custom filename to display (optional, mutually exclusive with is_csv)confirm_email_before_download: Boolean to require email confirmation before download (optional, default: true)retention_period: String specifying how long to retain the file, e.g., “26 weeks” (optional, default: “26 weeks”)curl -X POST https://api.notifications.service.gov.uk/v2/notifications/email \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email_address": "user@example.gov.uk",
"template_id": "f33517ff-2a88-4f6e-b855-c550268ce08a",
"personalisation": {
"name": "Jane Doe",
"reference_number": "REF-12345"
},
"reference": "email-confirmation-456"
}'
curl -X POST https://api.notifications.service.gov.uk/v2/notifications/email \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email_address": "user@example.gov.uk",
"template_id": "f33517ff-2a88-4f6e-b855-c550268ce08a",
"personalisation": {
"name": "Jane Doe",
"document": {
"file": "VGhpcyBpcyBhIHRlc3QgZG9jdW1lbnQ=",
"filename": "report.pdf",
"confirm_email_before_download": true,
"retention_period": "52 weeks"
}
}
}'
{
"id": "740e5834-3a29-46b4-9a6f-16142fde533a",
"reference": "email-confirmation-456",
"content": {
"from_email": "noreply@notifications.service.gov.uk",
"subject": "Confirmation for Jane Doe",
"body": "Dear Jane Doe, your reference number is REF-12345.",
"one_click_unsubscribe_url": null
},
"uri": "https://api.notifications.service.gov.uk/v2/notifications/740e5834-3a29-46b4-9a6f-16142fde533a",
"template": {
"id": "f33517ff-2a88-4f6e-b855-c550268ce08a",
"version": 1,
"uri": "https://api.notifications.service.gov.uk/services/8b3aa916-e138-4d4b-8c96-da8b6ddfe9a2/templates/f33517ff-2a88-4f6e-b855-c550268ce08a"
},
"scheduled_for": null
}
{
"status_code": 400,
"errors": [
{
"error": "InvalidRecipientError",
"message": "Not a valid email address"
}
]
}
{
"status_code": 400,
"errors": [
{
"error": "ValidationError",
"message": "email_address is a required property"
}
]
}
{
"status_code": 400,
"errors": [
{
"error": "ValidationError",
"message": "Do not set a value for `is_csv` if `filename` is set."
}
]
}
{
"status_code": 403,
"errors": [
{
"error": "BadRequestError",
"message": "Service is not allowed to send email"
}
]
}
{
"status_code": 404,
"errors": [
{
"error": "NoResultFound",
"message": "No result found"
}
]
}
{
"status_code": 429,
"errors": [
{
"error": "RateLimitError",
"message": "Exceeded rate limit for key type LIVE of 3000 requests per 60 seconds"
}
]
}