# Notifications Notifications are the actions taken to inform users or call third-party endpoints when a certain event happens. Typical actions include emails and callouts. Callouts typically refer to HTTP invocations, such as HTTP calls to REST services. Zuora notification system processes the events in the same order in which they are triggered. The timing and delivery of notifications can still vary based on factors such as retries, concurrency, and network latency. But Zuora guarantees the best performance possible with the right performance boosters and tuning. Notifications are associated with Communication Profiles, which allow you to send specific event-driven notifications to targeted customers. Zuora provides the following Settings API to access the settings of Communication Profiles:* [Get all Communication Profiles](https://knowledgecenter.zuora.com/DC_Developers/BB_C_Settings_API/Settings_API_tutorials/Get_all_Communication_Profiles) * [Create a new Communication Profile](https://knowledgecenter.zuora.com/DC_Developers/BB_C_Settings_API/Settings_API_tutorials/Create_a_new_Communication_Profile) * [Modify a Communication Profile](https://knowledgecenter.zuora.com/DC_Developers/BB_C_Settings_API/Settings_API_tutorials/Modify_a_Communication_Profile) * [Get all Notifications under a particular Communication Profile](https://knowledgecenter.zuora.com/DC_Developers/BB_C_Settings_API/Settings_API_tutorials/Get_all_Notifications_under_a_particular_Communication_Profile) ## Create a notification definition - [POST /notifications/notification-definitions](https://developer.zuora.com/v1-api-reference/api/notifications/post_create_notification_definition.md): Creates a notification definition. If a filter rule is specified, it will be evaluated to see if the notification definition is qualified to handle the incoming events during runtime. If the notification is qualified, it will send the email and invoke the callout if it has an email template or a callout. This operation supports creating notification definitions for all event types: - To create a notification definition for a standard event, you must specify the eventCategory field. For more information about standard event category codes, see Standard event category code for events and notifications. - To create a notification definition for a Zuora custom event, custom event, or custom scheduled event, you must specify the eventTypeName field. For more information, see Zuora custom events, Custom event triggers, and Custom scheduled events. You must specify either eventCategory or eventTypeName, but not both at the same time. ## List notification definitions - [GET /notifications/notification-definitions](https://developer.zuora.com/v1-api-reference/api/notifications/get_query_notification_definitions.md): Queries notification definitions with the specified filters. ## Retrieve a notification definition - [GET /notifications/notification-definitions/{id}](https://developer.zuora.com/v1-api-reference/api/notifications/get_get_notification_definition.md): Queries the notification definition of the given ID. ## Update a notification definition - [PUT /notifications/notification-definitions/{id}](https://developer.zuora.com/v1-api-reference/api/notifications/put_update_notification_definition.md): Updates a notification definition. ## Delete a notification definition - [DELETE /notifications/notification-definitions/{id}](https://developer.zuora.com/v1-api-reference/api/notifications/delete_delete_notification_definition.md): Deletes a notification definition. ## Create or update email templates - [POST /notifications/email-templates/import](https://developer.zuora.com/v1-api-reference/api/notifications/post_createorupdateemailtemplates.md): Creates email templates for standard or custom events if you do not specify email template IDs, or updates existing email templates if you specify valid email template IDs. For each email template when you are creating email templates, whether the template is created for a standard event, a custom event, or a custom scheduled event is dependent on whether you specify the eventCategory or eventTypeName field. - If you specify the eventCategory field, the email template is created based on a standard event. See Standard Event Categories for all standard event category codes. - If you specify the eventTypeName field, the email template is created based on the corresponding custom event or custom scheduled event. See Custom event triggers for more information about custom events, and Custom scheduled events for more information about custom scheduled events. The maximum number of email templates that you can create or update by one call is 1,000. ## Create an email template - [POST /notifications/email-templates](https://developer.zuora.com/v1-api-reference/api/notifications/post_create_email_template.md): Creates an email template. This operation supports creating the email template for all event types. - If you specify the eventCategory field, the email template is created based on a standard event. See Standard Event Categories for all standard event category codes. - If you specify the eventTypeName field, the email template is created based on the corresponding custom event or custom scheduled event. See Custom event triggers for more information about custom events, and Custom scheduled events for more information about custom scheduled events. ## List email templates - [GET /notifications/email-templates](https://developer.zuora.com/v1-api-reference/api/notifications/get_query_email_templates.md): Queries email templates. This operation supports querying email templates for all event types. ## Retrieve an email template - [GET /notifications/email-templates/{id}](https://developer.zuora.com/v1-api-reference/api/notifications/get_get_email_template.md): Queries the email template based on the specified ID. This operation supports retrieving the email template for all event types. ## Update an email template - [PUT /notifications/email-templates/{id}](https://developer.zuora.com/v1-api-reference/api/notifications/put_update_email_template.md): Updates an email template. This operation supports updating the email template for all event types. ## Delete an email template - [DELETE /notifications/email-templates/{id}](https://developer.zuora.com/v1-api-reference/api/notifications/delete_delete_email_template.md): Deletes an email template. This operation supports deleting an email template for all event types. ## Create or update callout templates - [POST /notifications/callout-templates/import](https://developer.zuora.com/v1-api-reference/api/notifications/createorupdatecallouttemplates.md): Creates callout templates for standard or custom events if you do not specify callout template IDs, or updates existing callout templates if you specify valid callout template IDs. For each callout template when you are creating callout templates, whether the template is created for a standard event, a custom event, or a custom scheduled event is dependent on whether you specify the eventCategory or eventTypeName field. - If you specify the eventCategory field, the callout template is created based on a standard event. See Standard event category code for events and notifications for all standard event category codes. - If you specify the eventTypeName field, the callout template is created based on the corresponding custom event, Zuora custom event, or custom scheduled event. See Custom event triggers for more information about custom events, and Custom scheduled events for more information about custom scheduled events. The maximum number of callout templates that you can create or update by one call is 1,000. ## Create a callout template - [POST /notifications/callout-templates](https://developer.zuora.com/v1-api-reference/api/notifications/createcallouttemplate.md): Creates a callout template. This operation supports creating the callout template for all event types: - To create a callout template for a standard event, you must specify the eventCategory field. For more information about standard event category codes, see Standard event category code for events and notifications. - To create a callout template for a Zuora custom event, custom event, or custom scheduled event, you must specify the eventTypeName field. For more information, see Zuora custom events, Custom event triggers, and Custom scheduled events. You must specify either eventCategory or eventTypeName, but not both at the same time. ## List callout templates - [GET /notifications/callout-templates](https://developer.zuora.com/v1-api-reference/api/notifications/getcallouttemplates.md): Queries callout templates. This operation supports querying callout templates for all event types. ## Retrieve a callout template - [GET /notifications/callout-templates/{id}](https://developer.zuora.com/v1-api-reference/api/notifications/getcallouttemplte.md): Queries the callout template based on the specified ID. This operation supports retrieving the callout template for all event types. ## Update a callout template - [PUT /notifications/callout-templates/{id}](https://developer.zuora.com/v1-api-reference/api/notifications/updatecallouttemplate.md): Updates a callout template. This operation supports updating the callout template for all event types. ## Delete a callout template - [DELETE /notifications/callout-templates/{id}](https://developer.zuora.com/v1-api-reference/api/notifications/deletecallouttemplate.md): Deletes a callout template. This operation supports deleting a callout template for all event types. ## Create or update reusable blocks - [POST /notifications/reusable-blocks/import](https://developer.zuora.com/v1-api-reference/api/notifications/createorupdatereusableblocks.md): Creates reusable blocks if you do not specify block IDs, or updates existing reusable blocks if you specify valid block IDs. All fields must be provided for each reusable block you want to update. The maximum number of reusable blocks that you can create or update by one call is 1,000. ## Create a reusable block - [POST /notifications/reusable-blocks](https://developer.zuora.com/v1-api-reference/api/notifications/createreusableblock.md): Creates a reusable block for email templates, such as email headers or footers. ## List reusable blocks - [GET /notifications/reusable-blocks](https://developer.zuora.com/v1-api-reference/api/notifications/getreusableblocks.md): Queries reusable blocks. ## Retrieve a reusable block - [GET /notifications/reusable-blocks/{blockKey}](https://developer.zuora.com/v1-api-reference/api/notifications/getreusableblock.md): Queries the reusable block based on the specified ID or name. ## Update a reusable block - [PUT /notifications/reusable-blocks/{blockKey}](https://developer.zuora.com/v1-api-reference/api/notifications/updatereusableblock.md): Updates a reusable block. ## Delete a reusable block - [DELETE /notifications/reusable-blocks/{blockKey}](https://developer.zuora.com/v1-api-reference/api/notifications/deletereusableblock.md): Deletes a reusable block. ## Delete notification histories for an account - [DELETE /notifications/history](https://developer.zuora.com/v1-api-reference/api/notifications/delete_delete_notification_history_for_account.md): Delete all notification histories for the given account. All email and callout notifications for this account will be deleted upon successful operation. ## Retrieve a notification history deletion task - [GET /notifications/history/tasks/{id}](https://developer.zuora.com/v1-api-reference/api/notifications/get_get_notification_history_deletion_task.md): Get the notification history deletion task by ID. ## Resend callout notifications - [POST /notifications/callout-histories/resend](https://developer.zuora.com/v1-api-reference/api/notifications/post_resendcalloutnotifications.md): Resends callout notifications if your customers did not receive previous callout notifications. Details about the status codes and response contents of this operation are as follows: | Scenario | Status code | Response content | |----------------------------------------|-----------------|-------------------------------------------------------------| | Success for all notifications | 202 Accepted | (blank) | | Success for at least one notification | 202 Accepted | Error code and error message of each failed notification | | Failure for all notifications | 400 Bad Request | Error code and error message of each failed notification | ## Resend email notifications - [POST /notifications/email-histories/resend](https://developer.zuora.com/v1-api-reference/api/notifications/post_resendemailnotifications.md): Resends email notifications if your customers did not receive previous email notifications. Details about the status codes and response contents of this operation are as follows: | Scenario | Status code | Response content | |----------------------------------------|-----------------|-------------------------------------------------------------| | Success for all notifications | 202 Accepted | (blank) | | Success for at least one notification | 202 Accepted | Error code and error message of each failed notification | | Failure for all notifications | 400 Bad Request | Error code and error message of each failed notification | ## List callout notification histories - [GET /v1/notification-history/callout](https://developer.zuora.com/v1-api-reference/api/notifications/get_callouthistory.md): Describes how to get a notification history for callouts. ## List email notification histories - [GET /v1/notification-history/email](https://developer.zuora.com/v1-api-reference/api/notifications/get_emailhistory.md): Describes how to get a notification history for notification emails. ### Notes Request parameters and their values may be appended with a "?" following the HTTPS GET request. Additional request parameter are separated by "&". For example: GET https://rest.zuora.com/v1/notification-history/email?startTime=2015-01-12T00:00:00&endTime=2015-01-15T00:00:00&failedOnly=false&eventCategory=1000&pageSize=1