Use a template to send email to a user
post
/ec-notifications-svc/rest/v4.0/email/{templatetype}
Sends email to users with the specified template. Supports a list of study role IDs in addition to email addresses. The recipients are restricted to the sites they have access to. The template is stored in the configuration PDB.
Request
Path Parameters
-
templatetype(required): string
Name of template to use to send email. Valid values are taken from email template configuration database.
Supported Media Types
- application/json
Root Schema : schema
Type:
Show Source
object-
emailAddresses: array
emailAddresses
-
placeHolderImageMap: object
placeHolderImageMap
Additional Properties Allowed: additionalProperties
-
placeHolderValueMap: object
placeHolderValueMap
Additional Properties Allowed: additionalProperties
-
siteId: string
-
studyRoleIds: array
studyRoleIds
-
subject(required): string
-
users: array
users
Response
Supported Media Types
- application/json
200 Response
Success.
400 Response
Bad request.
Root Schema : NotificationResponse
Type:
Show Source
object-
errorData: object
ErrorResponseData
Structure representing an error response from the reporting service. Contains an error code, human-readable message, and details.
-
result: object
result
-
status: string
Nested Schema : ErrorResponseData
Type:
objectStructure representing an error response from the reporting service. Contains an error code, human-readable message, and details.
Show Source
-
details: string
Detailed error context or debugging information such as validation error, stack trace, or field/parameter cause.Example:
User role is missing required permission REPORTING_VIEW. Field: userId -
errorCode: string
Application or business-specific error code representing the error type.Example:
REPT_401 -
errorMessage: string
Human-readable error message describing the failure or issue.Example:
Unauthorized: User does not have access to the requested resource
Nested Schema : result
Type:
object500 Response
Internal server error.
Root Schema : NotificationResponse
Type:
Show Source
object-
errorData: object
ErrorResponseData
Structure representing an error response from the reporting service. Contains an error code, human-readable message, and details.
-
result: object
result
-
status: string
Nested Schema : ErrorResponseData
Type:
objectStructure representing an error response from the reporting service. Contains an error code, human-readable message, and details.
Show Source
-
details: string
Detailed error context or debugging information such as validation error, stack trace, or field/parameter cause.Example:
User role is missing required permission REPORTING_VIEW. Field: userId -
errorCode: string
Application or business-specific error code representing the error type.Example:
REPT_401 -
errorMessage: string
Human-readable error message describing the failure or issue.Example:
Unauthorized: User does not have access to the requested resource
Nested Schema : result
Type:
object