curl --request GET \
--url https://api.example.com/v2/notifications{
"notifications": [
{}
],
"links": {
"links.current": "<string>",
"links.next": "<string>"
}
}curl --request GET \
--url https://api.example.com/v2/notifications{
"notifications": [
{}
],
"links": {
"links.current": "<string>",
"links.next": "<string>"
}
}Get a paginated list of all notifications sent by your service.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.
createdsendingsentdeliveredpendingfailedtechnical-failuretemporary-failurepermanent-failureaccepted - Letter accepted for printingreceived - Letter received by postal servicecancelledpending-virus-checkvirus-scan-failedvalidation-failedtechnical-failurereturned-lettersms, email, letter.true or True to include notifications sent via CSV upload jobs. By default, only API-sent notifications are returned.curl -X GET "https://api.notifications.service.gov.uk/v2/notifications?status=delivered&template_type=email" \
-H "Authorization: Bearer YOUR_API_KEY"
curl -X GET "https://api.notifications.service.gov.uk/v2/notifications?older_than=740e5834-3a29-46b4-9a6f-16142fde533a" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"notifications": [
{
"id": "740e5834-3a29-46b4-9a6f-16142fde533a",
"reference": "appointment-reminder-123",
"email_address": null,
"phone_number": "+447700900123",
"line_1": null,
"line_2": null,
"line_3": null,
"line_4": null,
"line_5": null,
"line_6": null,
"postcode": null,
"type": "sms",
"status": "delivered",
"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"
},
"body": "Hello John Smith, your appointment is on 12 March 2024.",
"subject": null,
"created_at": "2024-03-03T10:30:00.000000Z",
"sent_at": "2024-03-03T10:30:02.000000Z",
"completed_at": "2024-03-03T10:30:05.000000Z",
"scheduled_for": null,
"postage": null,
"one_click_unsubscribe_url": null,
"cost_in_pounds": 0.016,
"cost_details": {},
"is_cost_data_ready": true
},
{
"id": "950e5834-3a29-46b4-9a6f-16142fde533b",
"reference": "email-confirmation-456",
"email_address": "user@example.gov.uk",
"phone_number": null,
"line_1": null,
"line_2": null,
"line_3": null,
"line_4": null,
"line_5": null,
"line_6": null,
"postcode": null,
"type": "email",
"status": "delivered",
"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"
},
"body": "Dear Jane Doe, your reference number is REF-12345.",
"subject": "Confirmation for Jane Doe",
"created_at": "2024-03-03T11:15:00.000000Z",
"sent_at": "2024-03-03T11:15:01.000000Z",
"completed_at": "2024-03-03T11:15:10.000000Z",
"scheduled_for": null,
"postage": null,
"one_click_unsubscribe_url": null,
"cost_in_pounds": 0.00,
"cost_details": {},
"is_cost_data_ready": true
}
],
"links": {
"current": "https://api.notifications.service.gov.uk/v2/notifications?status=delivered&template_type=email",
"next": "https://api.notifications.service.gov.uk/v2/notifications?status=delivered&template_type=email&older_than=950e5834-3a29-46b4-9a6f-16142fde533b"
}
}
{
"notifications": [],
"links": {
"current": "https://api.notifications.service.gov.uk/v2/notifications?older_than=abc12345-1234-5678-9abc-def012345678"
}
}
{
"status_code": 400,
"errors": [
{
"error": "ValidationError",
"message": "status must be one of: created, sending, sent, delivered, pending, failed, technical-failure, temporary-failure, permanent-failure"
}
]
}
{
"status_code": 400,
"errors": [
{
"error": "ValidationError",
"message": "template_type must be one of: sms, email, letter"
}
]
}
{
"status_code": 400,
"errors": [
{
"error": "ValidationError",
"message": "older_than is not a valid UUID"
}
]
}
older_than parameterlinks.next URLolder_than value from the next URLolder_than parameterlinks.next is present in the responseinclude_jobs=true to include bulk upload notifications?status=delivered&status=sent