Retrieve Email Notification Histories
Retrieve details about the email notifications sent by Vault. Details include the notification date, recipient, subject, and delivery status. In the UI, this information is available in Admin > Operations > Email Notification Status. Learn more about Email Notification Status in Vault Help
GET
/api/{version}/notifications/historiesHeaders
Section link for Headers| Name | Description |
|---|---|
Content-Type | application/json (default) |
Accept | application/json (default) or application/xml |
Query Parameters
Section link for Query ParametersYou can modify the request by using one or more of the following parameters:
| Name | Description |
|---|---|
start_date | Specify a start date to retrieve notification history. This date cannot be more than 3 months ago. To retrieve older email notifications, use the all_dates parameter instead.Dates must be in YYYY-MM-DD or YYYY-MM-DDTHH:mm:ssZ format. If time is omitted (THH:mm:ssZ), defaults to the start of the day. If start_date is omitted entirely, defaults to the start of the previous day.If you’ve specified a start_date, you must also specify an end_date. |
end_date | Specify an end date to retrieve notification history. This date cannot be more than 30 days away from the specified start_date. Dates must be in YYYY-MM-DD or YYYY-MM-DDTHH:mm:ssZ format. If time is omitted (THH:mm:ssZ), defaults to the time of the API request.If you’ve specified an end_date, you must also specify a start_date. |
all_dates | Set to true to request notification history for all dates. This request starts a job to prepare a downloadable .zip of CSV files of the entire notification history by year. This is similar to requesting Export Full History from the Vault UI. When requesting a full notification history, you must leave start_date and end_date blank and set format_result to csv. You can request an export of notification history for all_dates once every 24 hours.Emails sent before 22R3 may have data in the status column only, and may have blank values in some columns. |
format_result | To request a downloadable CSV file of your notification history, set this parameter to csv. The response contains a jobId to retrieve the job status, which provides a link to download the CSV file. If omitted, the API returns a JSON response with notification history and does not start a job. If all_dates is true, this parameter must be csv. |
limit | Paginate the results by specifying the maximum number of histories per page in the response. This can be any value between 1 and 1000. If omitted, defaults to 200. |
offset | Paginate the results displayed per page by specifying the amount of offset from the entry returned. If omitted, defaults to 0. |
Request: 30 Days
Section link for Request: 30 Dayscurl -X GET -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v26.1/notifications/histories?start_date=2022-09-10&end_date=2022-10-09Response: 30 Days
Section link for Response: 30 Days{
"responseStatus": "SUCCESS",
"responseDetails": {
"offset": 0,
"limit": 200,
"size": 3,
"total": 3
},
"data": [
{
"send_date": "2022-09-13T06:44:18.000Z",
"recipient_name": "Teresa Ibanez",
"recipient_id": 995595,
"recipient_email": "tibanez@veepharm.com",
"status": "delivered__sys",
"error_message": null,
"subject": "Notification: Review completed, changes not required",
"workflow_id": 1502,
"task_id": null,
"document_id": null,
"major_version": null,
"minor_version": null,
"object_name": "envelope__sys",
"object_record_id": "0ER00000000E002",
"sender_name": "Justine Lo",
"sender_id": 694695,
"notification_id": 107,
"included_notification_ids": null,
"status_date": "2022-09-13T06:44:18.000Z",
"template_name": "basereviewedapproved__v"
},
{
"send_date": "2022-09-13T06:41:02.000Z",
"recipient_name": "Teresa Ibanez",
"recipient_id": 995595,
"recipient_email": "tibanez@veepharm.com",
"status": "delivered__sys",
"error_message": null,
"subject": "Notification: Documents not approved, changes required",
"workflow_id": 1501,
"task_id": null,
"document_id": null,
"major_version": null,
"minor_version": null,
"object_name": "envelope__sys",
"object_record_id": "0ER00000000E001",
"sender_name": "Megan Murray",
"sender_id": 1083287,
"notification_id": 106,
"included_notification_ids": null,
"status_date": "2022-09-13T06:41:03.000Z",
"template_name": "baseapprovedwithchangesmdw__v"
},
{
"send_date": "2022-09-13T06:37:18.000Z",
"recipient_name": "Teresa Ibanez",
"recipient_id": 1083287,
"recipient_email": "tibanez@veepharm.com",
"status": "delivered__sys",
"error_message": null,
"subject": "Notification: Mentioned in comment on sample.",
"workflow_id": null,
"task_id": null,
"document_id": 6,
"major_version": 0,
"minor_version": 1,
"object_name": null,
"object_record_id": null,
"sender_name": "Olivia Cattington",
"sender_id": 995595,
"notification_id": 104,
"included_notification_ids": null,
"status_date": "2022-09-13T06:37:18.000Z",
"template_name": "usermentionnotifications__v"
}
]
}Request: All Dates
Section link for Request: All Datescurl -X GET -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v26.1/notifications/histories?all_dates=true&format_result=csvResponse: All Dates
Section link for Response: All Dates{
"responseStatus": "SUCCESS",
"jobId": "639014",
"url": "/api/v26.1/services/jobs/639014"
}