cURL
curl --request GET \ --url https://api.example.com/v2/template/{id}
{ "id": "<string>", "type": "<string>", "created_at": "<string>", "updated_at": "<string>", "created_by": "<string>", "version": 123, "body": "<string>", "subject": "<string>", "name": "<string>", "postage": "<string>", "status_code": 123, "errors": [ {} ] }
sms
email
letter
first
second
economy
europe
rest-of-world
curl -X GET "https://api.notifications.service.gov.uk/v2/template/f33517ff-2a88-4f6e-b855-c550268ce08a" \ -H "Authorization: Bearer your_api_key_here"
{ "id": "f33517ff-2a88-4f6e-b855-c550268ce08a", "type": "email", "created_at": "2024-01-15T14:30:00.000000Z", "updated_at": "2024-01-16T09:15:00.000000Z", "created_by": "[email protected]", "version": 3, "body": "Hello ((name)),\n\nYour reference number is ((reference)).", "subject": "Your application has been received", "name": "Application confirmation email", "postage": null }
{ "status_code": 400, "errors": [ { "error": "ValidationError", "message": "id is not a valid UUID" } ] }
{ "status_code": 403, "errors": [ { "error": "AuthError", "message": "Invalid token: service not found" } ] }
{ "status_code": 404, "errors": [ { "error": "NoResultFound", "message": "No result found" } ] }