---
title: "Create or update callout templates"
method: POST
path: "/notifications/callout-templates/import"
tags: ["Notifications"]
---

# Create or update callout templates

`POST /notifications/callout-templates/import`

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 <a href="https://docs.zuora.com?resourceId=platform-parent-and-event-category-code" target="_blank">Standard event category code for events and notifications</a> 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](https://developer.zuora.com/api-references/api/tag/Custom-Event-Triggers/) for more information about custom events, and [Custom scheduled events](https://developer.zuora.com/api-references/api/tag/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.

## Headers

- `Idempotency-Key` string
- `Accept-Encoding` string
- `Content-Encoding` string
- `Zuora-Track-Id` string
- `Zuora-Entity-Ids` string
- `Zuora-Org-Ids` string

## Request body

- POSTCreateOrUpdateCalloutTemplateRequest
  - `allowPartialSuccess` boolean — When set to `false`, the call will fail if one or multiple instances fail to import, and a `200` response is returned if all callout templates have been successfully updated. When set to `true`, a success (`200`) response is returned if one or more instances have imported successfully. All failed instances are also returned in the response.
  - `calloutTemplates` union[] — A container for callout templates.
    - union
      - POSTCreateOrUpdateCalloutTemplateRequestCommon — Common information for callout templates.
        - `active` boolean — The status of the callout. The default is `true`.
        - `calloutBaseurl` string, url, required — The callout URL. It must start with `https://`. Zuora uses port 443 to send callout notifications by default. If you want to use other ports, submit a request at <a href="http://support.zuora.com/" target="_blank">Zuora Global Support</a>. You can add merge fields in the callout URL. For example, `https://mywebsite.com/zuora/{{DataSource.Account.Id}}`. For more information, see <a href="https://docs.zuora.com?resourceId=platform-merge-field-syntax" target="_blank">Merge field syntax for email and callout templates</a>.
        - `calloutHeaders` object — Container for custom callout headers. Each custom callout header consists of a header name and a header value.
        - `calloutParams` object — Container for callout parameters sent in the request body. Each callout parameter consists of a parameter name and a parameter value.
        - `calloutRetry` boolean — Specified whether to retry the callout when the callout fails. The default value is `true`.
        - `certificate` string — The SSL certificate for the domain of the callout receiver server specified in `calloutBaseurl`. The value must be in PEM format, which typically starts with `-----BEGIN CERTIFICATE-----` and ends with `-----END CERTIFICATE-----`. Specifying the SSL certificate can eliminate SSL certificate errors (HTTP status code 495) for callout notifications.
        - `confirmSuccessFromResponseContent` boolean — Indicates how Zuora determines whether callout notifications to your system succeed or fail: * If `false`, Zuora determines the result based solely on the HTTP response status code. This is the default value. * If `true`, and the HTTP response status code is 200, Zuora evaluates the callout response and considers the notification successful only if the `Content-Type` header is set to `application/json`, and the response body contains a `success` field set to `true`.
        - `customRequestBody` string — Customized request body. This field is available only for callouts whose Content-Type in the request body is `application/json`. The value must be in JSON format and double quotes in the value must be escaped. You can add merge fields to the request body. For example, `{\"AccountNumber\": \"{{DataSource.Account.AccountNumber}}\",\"AccountId\": \"{{DataSource.Account.Id}}\"}`. For more information, see <a href="https://docs.zuora.com?resourceId=platform-merge-field-syntax" target="_blank">Merge field syntax for email and callout templates</a>. You must set `useCustomRequestBody` to `true` if you want to customize the callout request body with this field. Alternatively, you can use the `calloutParams` field.
        - `description` string — Description for the callout template.
        - `eventCategory` number — The event category code for a standard event that the callout template relates to. This field is required when creating callout templates for standard events. For the list of supported standard event category codes, see <a href="https://docs.zuora.com?resourceId=platform-parent-and-event-category-code" target="_blank">Standard event category code for events and notifications</a>.
        - `eventTypeName` string — The name of a custom event that the callout template relates to. This field is required when creating callout templates for Zuora custom events, custom events, or custom scheduled events. If this field is provided, you can specify the event namespace in the `eventTypeNamespace` field.
        - `eventTypeNamespace` 'user.notification' | 'com.zuora.notification' — The namespace of the `eventTypeName` field. It indicates who created the event and which namespace the event is assigned to. Supported values are as follows: - `com.zuora.notification`: events that are created by Zuora. This value applies to Zuora custom events. - `user.notification`: events that are created by tenant users. This value applies to custom events and custom scheduled events. This is the default value. For example, if you want to create a callout template that relates to the `OrderActionProcessed` event, which is a Zuora custom event, you must specify `com.zuora.notification` for this field.
        - `hmacAlgorithm` 'MD5' | 'SHA-1' | 'SHA-224' | 'SHA-256' | 'SHA-384' | 'SHA-512' — The hash function Zuora uses to generate the signed data for HMAC authentication.
        - `hmacData` string — The message to be authenticated for HMAC authentication. You can use merge fields in this value: - `{{Request.Headers.<header_name>}}`: Refers to the value of a particular request header. For example, `{{Request.Headers.Date}}` refers to the value of the request header called `Date`. - `{{Request.Body}}`: Refers to the request body. - Other merge fields: See <a href="https://docs.zuora.com?resourceId=platform-merge-field-syntax" target="_blank">Merge field syntax for email and callout templates</a>.
        - `hmacKey` string — The header key that Zuora uses to send the header value for HMAC authentication. The header value is specified in the `hmacValue` field and typically contains the signed data.
        - `hmacOutputFormat` 'BASE64' | 'HEX' — The format of the signed data for HMAC authentication.
        - `hmacSecret` string — The shared secret key that Zuora uses to generate the signed data for HMAC authentication.
        - `hmacValue` string — The header value for HMAC authentication. The header key is specified in the `hmacKey` field. You can use merge fields in this value: - `{{Request.HMAC.Signed}}`: Refers to the signed data. - Other merge fields: See <a href="https://docs.zuora.com?resourceId=platform-merge-field-syntax" target="_blank">Merge field syntax for email and callout templates</a>. The following is a header value example: `The algorithm is SHA-256 and the signed data is {{Request.HMAC.Signed}}`.
        - `httpMethod` 'POST' | 'GET' | 'PUT' | 'PATCH' | 'DELETE', required — The HTTP method of the callout.
        - `id` string — ID of an existing callout template. Specify this field if you want to update an existing callout template.
        - `name` string, required — The name of the callout template. It must be unique across all callout templates.
        - `useCustomRequestBody` boolean — Indicates whether to enable the customized request body configured in the `customRequestBody` field.
      - POSTCreateOrUpdateCalloutTemplateRequestBasicAuthentication — The Basic Authentication information for callout notifications.
        - `active` boolean — The status of the callout. The default is `true`.
        - `calloutBaseurl` string, url, required — The callout URL. It must start with `https://`. Zuora uses port 443 to send callout notifications by default. If you want to use other ports, submit a request at <a href="http://support.zuora.com/" target="_blank">Zuora Global Support</a>. You can add merge fields in the callout URL. For example, `https://mywebsite.com/zuora/{{DataSource.Account.Id}}`. For more information, see <a href="https://docs.zuora.com?resourceId=platform-merge-field-syntax" target="_blank">Merge field syntax for email and callout templates</a>.
        - `calloutHeaders` object — Container for custom callout headers. Each custom callout header consists of a header name and a header value.
        - `calloutParams` object — Container for callout parameters sent in the request body. Each callout parameter consists of a parameter name and a parameter value.
        - `calloutRetry` boolean — Specified whether to retry the callout when the callout fails. The default value is `true`.
        - `certificate` string — The SSL certificate for the domain of the callout receiver server specified in `calloutBaseurl`. The value must be in PEM format, which typically starts with `-----BEGIN CERTIFICATE-----` and ends with `-----END CERTIFICATE-----`. Specifying the SSL certificate can eliminate SSL certificate errors (HTTP status code 495) for callout notifications.
        - `confirmSuccessFromResponseContent` boolean — Indicates how Zuora determines whether callout notifications to your system succeed or fail: * If `false`, Zuora determines the result based solely on the HTTP response status code. This is the default value. * If `true`, and the HTTP response status code is 200, Zuora evaluates the callout response and considers the notification successful only if the `Content-Type` header is set to `application/json`, and the response body contains a `success` field set to `true`.
        - `customRequestBody` string — Customized request body. This field is available only for callouts whose Content-Type in the request body is `application/json`. The value must be in JSON format and double quotes in the value must be escaped. You can add merge fields to the request body. For example, `{\"AccountNumber\": \"{{DataSource.Account.AccountNumber}}\",\"AccountId\": \"{{DataSource.Account.Id}}\"}`. For more information, see <a href="https://docs.zuora.com?resourceId=platform-merge-field-syntax" target="_blank">Merge field syntax for email and callout templates</a>. You must set `useCustomRequestBody` to `true` if you want to customize the callout request body with this field. Alternatively, you can use the `calloutParams` field.
        - `description` string — Description for the callout template.
        - `eventCategory` number — The event category code for a standard event that the callout template relates to. This field is required when creating callout templates for standard events. For the list of supported standard event category codes, see <a href="https://docs.zuora.com?resourceId=platform-parent-and-event-category-code" target="_blank">Standard event category code for events and notifications</a>.
        - `eventTypeName` string — The name of a custom event that the callout template relates to. This field is required when creating callout templates for Zuora custom events, custom events, or custom scheduled events. If this field is provided, you can specify the event namespace in the `eventTypeNamespace` field.
        - `eventTypeNamespace` 'user.notification' | 'com.zuora.notification' — The namespace of the `eventTypeName` field. It indicates who created the event and which namespace the event is assigned to. Supported values are as follows: - `com.zuora.notification`: events that are created by Zuora. This value applies to Zuora custom events. - `user.notification`: events that are created by tenant users. This value applies to custom events and custom scheduled events. This is the default value. For example, if you want to create a callout template that relates to the `OrderActionProcessed` event, which is a Zuora custom event, you must specify `com.zuora.notification` for this field.
        - `hmacAlgorithm` 'MD5' | 'SHA-1' | 'SHA-224' | 'SHA-256' | 'SHA-384' | 'SHA-512' — The hash function Zuora uses to generate the signed data for HMAC authentication.
        - `hmacData` string — The message to be authenticated for HMAC authentication. You can use merge fields in this value: - `{{Request.Headers.<header_name>}}`: Refers to the value of a particular request header. For example, `{{Request.Headers.Date}}` refers to the value of the request header called `Date`. - `{{Request.Body}}`: Refers to the request body. - Other merge fields: See <a href="https://docs.zuora.com?resourceId=platform-merge-field-syntax" target="_blank">Merge field syntax for email and callout templates</a>.
        - `hmacKey` string — The header key that Zuora uses to send the header value for HMAC authentication. The header value is specified in the `hmacValue` field and typically contains the signed data.
        - `hmacOutputFormat` 'BASE64' | 'HEX' — The format of the signed data for HMAC authentication.
        - `hmacSecret` string — The shared secret key that Zuora uses to generate the signed data for HMAC authentication.
        - `hmacValue` string — The header value for HMAC authentication. The header key is specified in the `hmacKey` field. You can use merge fields in this value: - `{{Request.HMAC.Signed}}`: Refers to the signed data. - Other merge fields: See <a href="https://docs.zuora.com?resourceId=platform-merge-field-syntax" target="_blank">Merge field syntax for email and callout templates</a>. The following is a header value example: `The algorithm is SHA-256 and the signed data is {{Request.HMAC.Signed}}`.
        - `httpMethod` 'POST' | 'GET' | 'PUT' | 'PATCH' | 'DELETE', required — The HTTP method of the callout.
        - `id` string — ID of an existing callout template. Specify this field if you want to update an existing callout template.
        - `name` string, required — The name of the callout template. It must be unique across all callout templates.
        - `useCustomRequestBody` boolean — Indicates whether to enable the customized request body configured in the `customRequestBody` field.
        - `requiredAuth` boolean — Indicates whether Basic authentication is enabled for the callout. When creating callout notifications with Basic authentication enabled, you must set this field to `true` and specify the username and password in `calloutAuth`.
        - `calloutAuth` CalloutAuth, nullable — If `requiredAuth` is `true`, this object is required.
          - `domain` string — The domain of the callout auth.
          - `password` string — The field is required when `requiredAuth` is `true`.
          - `preemptive` boolean — Set this field to `true` if you want to enable the preemptive authentication.
          - `username` string — The field is required when `requiredAuth` is `true`.
      - POSTCreateOrUpdateCalloutTemplateRequestOauth2Authentication — The OAuth 2.0 Authentication information for callout notifications.
        - `active` boolean — The status of the callout. The default is `true`.
        - `calloutBaseurl` string, url, required — The callout URL. It must start with `https://`. Zuora uses port 443 to send callout notifications by default. If you want to use other ports, submit a request at <a href="http://support.zuora.com/" target="_blank">Zuora Global Support</a>. You can add merge fields in the callout URL. For example, `https://mywebsite.com/zuora/{{DataSource.Account.Id}}`. For more information, see <a href="https://docs.zuora.com?resourceId=platform-merge-field-syntax" target="_blank">Merge field syntax for email and callout templates</a>.
        - `calloutHeaders` object — Container for custom callout headers. Each custom callout header consists of a header name and a header value.
        - `calloutParams` object — Container for callout parameters sent in the request body. Each callout parameter consists of a parameter name and a parameter value.
        - `calloutRetry` boolean — Specified whether to retry the callout when the callout fails. The default value is `true`.
        - `certificate` string — The SSL certificate for the domain of the callout receiver server specified in `calloutBaseurl`. The value must be in PEM format, which typically starts with `-----BEGIN CERTIFICATE-----` and ends with `-----END CERTIFICATE-----`. Specifying the SSL certificate can eliminate SSL certificate errors (HTTP status code 495) for callout notifications.
        - `confirmSuccessFromResponseContent` boolean — Indicates how Zuora determines whether callout notifications to your system succeed or fail: * If `false`, Zuora determines the result based solely on the HTTP response status code. This is the default value. * If `true`, and the HTTP response status code is 200, Zuora evaluates the callout response and considers the notification successful only if the `Content-Type` header is set to `application/json`, and the response body contains a `success` field set to `true`.
        - `customRequestBody` string — Customized request body. This field is available only for callouts whose Content-Type in the request body is `application/json`. The value must be in JSON format and double quotes in the value must be escaped. You can add merge fields to the request body. For example, `{\"AccountNumber\": \"{{DataSource.Account.AccountNumber}}\",\"AccountId\": \"{{DataSource.Account.Id}}\"}`. For more information, see <a href="https://docs.zuora.com?resourceId=platform-merge-field-syntax" target="_blank">Merge field syntax for email and callout templates</a>. You must set `useCustomRequestBody` to `true` if you want to customize the callout request body with this field. Alternatively, you can use the `calloutParams` field.
        - `description` string — Description for the callout template.
        - `eventCategory` number — The event category code for a standard event that the callout template relates to. This field is required when creating callout templates for standard events. For the list of supported standard event category codes, see <a href="https://docs.zuora.com?resourceId=platform-parent-and-event-category-code" target="_blank">Standard event category code for events and notifications</a>.
        - `eventTypeName` string — The name of a custom event that the callout template relates to. This field is required when creating callout templates for Zuora custom events, custom events, or custom scheduled events. If this field is provided, you can specify the event namespace in the `eventTypeNamespace` field.
        - `eventTypeNamespace` 'user.notification' | 'com.zuora.notification' — The namespace of the `eventTypeName` field. It indicates who created the event and which namespace the event is assigned to. Supported values are as follows: - `com.zuora.notification`: events that are created by Zuora. This value applies to Zuora custom events. - `user.notification`: events that are created by tenant users. This value applies to custom events and custom scheduled events. This is the default value. For example, if you want to create a callout template that relates to the `OrderActionProcessed` event, which is a Zuora custom event, you must specify `com.zuora.notification` for this field.
        - `hmacAlgorithm` 'MD5' | 'SHA-1' | 'SHA-224' | 'SHA-256' | 'SHA-384' | 'SHA-512' — The hash function Zuora uses to generate the signed data for HMAC authentication.
        - `hmacData` string — The message to be authenticated for HMAC authentication. You can use merge fields in this value: - `{{Request.Headers.<header_name>}}`: Refers to the value of a particular request header. For example, `{{Request.Headers.Date}}` refers to the value of the request header called `Date`. - `{{Request.Body}}`: Refers to the request body. - Other merge fields: See <a href="https://docs.zuora.com?resourceId=platform-merge-field-syntax" target="_blank">Merge field syntax for email and callout templates</a>.
        - `hmacKey` string — The header key that Zuora uses to send the header value for HMAC authentication. The header value is specified in the `hmacValue` field and typically contains the signed data.
        - `hmacOutputFormat` 'BASE64' | 'HEX' — The format of the signed data for HMAC authentication.
        - `hmacSecret` string — The shared secret key that Zuora uses to generate the signed data for HMAC authentication.
        - `hmacValue` string — The header value for HMAC authentication. The header key is specified in the `hmacKey` field. You can use merge fields in this value: - `{{Request.HMAC.Signed}}`: Refers to the signed data. - Other merge fields: See <a href="https://docs.zuora.com?resourceId=platform-merge-field-syntax" target="_blank">Merge field syntax for email and callout templates</a>. The following is a header value example: `The algorithm is SHA-256 and the signed data is {{Request.HMAC.Signed}}`.
        - `httpMethod` 'POST' | 'GET' | 'PUT' | 'PATCH' | 'DELETE', required — The HTTP method of the callout.
        - `id` string — ID of an existing callout template. Specify this field if you want to update an existing callout template.
        - `name` string, required — The name of the callout template. It must be unique across all callout templates.
        - `useCustomRequestBody` boolean — Indicates whether to enable the customized request body configured in the `customRequestBody` field.
        - `requiredOauth2` boolean — Indicates whether OAuth 2.0 authentication is enabled for the callout. When creating callout notifications with OAuth 2.0 authentication enabled, you must set this field to `true` and specify the OAuth 2.0 provider ID in `oauth2ProviderId`.
        - `oauth2ProviderId` unknown

## Response `200`

OK

- CreateOrUpdateEmailTemplatesResponse
  - `reasons` string[] — Returns an empty array if the request succeeds.

---

[API](https://skmtc.dev/zuora/apis/api-reference.md) · [All operations](https://skmtc.dev/zuora/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/zuora/api-reference/revisions/d11e237f3e54/schema)
