Email API

(0 reviews)
This API will be used to send Emails to email address specified in query parameters along with subject

home

Overview:

Email API sends an email to particular email address specified in query parameters.

API MethodREST EndpointDescriptionConsumers
1.POST/v1/smtp/emailThis V1 version endpoint uses SMTP Email server to send emails by taking 'from', 'to', 'subject' and 'name' as input query parameters.Desktop / Web User
2.POST/v2/smtp/emailThis V2 version endpoint uses Mimecast server to send emails by taking 'from', 'to', 'bcc' and 'attachments' in input post request.Desktop / Web User
3.POST/v2/smtp/email/attachmentsThis V2 version endpoint uses Mimecast server by taking 'attachments' like pdf,excel,csv,docx,txt,jpegDesktop / Web User

Flow Diagram and Description: V1 version

  1. The V1 version communicates with SMTP server through ca-utility-sapi API and send emails.
  2. This API sends an email by taking fromEmail, toEmail, subject and name as input query parameters.

resources/image-2c05fe2f-3bc0-4f5c-8dcf-d26bb298daee.png

Flow Diagram and Description: V2 version

  1. The V2 version communicates with Mimecast server through ca-utility-sapi API end points and send emails.
  2. It sends an email by, taking bcc and attachments in input post request.
  3. The attachments end point will take attachments for following extensions pdf, excel, csv, docx, txt, jpeg and send an email

resources/mimecast%20flow-ab371d3a-ceb8-458c-8a34-58fd15abfd84.PNG

Sequence Diagram: V1 version

resources/image-c07808ce-fa95-458d-948c-4d41f9ac6f25.png

Sequence Diagram: V2 version

resources/mimecast%20seq-fb33bb08-2671-47c2-8cee-6723a49fcf86.PNG

Steps In Sequence Diagram

for /v1/smtp/email

NoStepsDescription
1.Input Request MessageScript Validation get service invokes the mule services along with credentials via Mule Soft Secure API layer.
2.Validate the Bearer token credentialsIf the token is authorized the request is sent to the endpoint.
3.If validation fails, service returns specific fault responseIf validation fails, service returns specific fault response to the caller.
4.If the request succeeds after calling SMTP server EndpointA success response is sent to the Xapi which sends the success response to the caller.
5.If the request fails after calling the System layerA failed response or a message is sent to Xapi which send the messages to the caller.

for /v2/smtp/email

NoStepsDescription
1.Input Request MessageScript Validation get service invokes the mule services along with credentials via Mule Soft Secure API layer.
2.Validate the Bearer token credentialsIf client_id and client_secret are validated by identity application.
3.If validation fails, service returns specific fault responseIf validation fails, service returns specific fault response to the caller.
4.If the request succeeds after calling Mimecast server EndpointA success response is sent to the Xapi which sends the success response to the caller.
5.If the request fails after calling the System layerA failed response or a message is sent to Xapi which send the messages to the caller.

End Point details:

Email Experience API : /v1/smtp/email

TopicDetails
1.Operation Description• Send Email to specified email address
2.URI/v1/smtp/email
3.Interface SourceDesktop / Web User
4.Interface TargetCA-UTILITY-SAPI send email to email address in request
5.Synchronous/AsynchronousSynchronous
6.ProtocolHTTPs
7.URLhttps://apis-sandbox.cambridgeassessment.org.uk/qa1/v1/smtp/email
8.Mode of Communication☐ Batch ☐ Message ☒ Real Time
9.Interface Pattern☐ Publish / Subscribe ☒ Request / Reply
10.Email serverSMTP Email server

Email Experience API : /v2/smtp/email

TopicDetails
1.Operation Description• Send Email to specified email address with attachments
2.URI/v2/smtp/email
3.Interface SourceDesktop / Web User
4.Interface TargetCA-UTILITY-SAPI send email to email address in request
5.Synchronous/AsynchronousSynchronous
6.ProtocolHTTPs
7.URLhttps://apis-sandbox.cambridgeassessment.org.uk/qa1/v2/smtp/email
8.Mode of Communication☐ Batch ☐ Message ☒ Real Time
9.Interface Pattern☐ Publish / Subscribe ☒ Request / Reply
10.Email serverMimecast server

Email Experience API : /v2/smtp/email/attachments

TopicDetails
1.Operation Description• Send Email to specified email address with attachments. attachments provided as form of data
2.URI/v2/smtp/email/attachments
3.Interface SourceDesktop / Web User
4.Interface TargetCA-UTILITY-SAPI send email to email address in request
5.Synchronous/AsynchronousSynchronous
6.ProtocolHTTPs
7.URLhttps://apis-sandbox.cambridgeassessment.org.uk/qa1/v2/smtp/email/attachments
8.Mode of Communication☐ Batch ☐ Message ☒ Real Time
9.Interface Pattern☐ Publish / Subscribe ☒ Request / Reply
10.Email serverMimecast server

Error Codes

HTTP CodeError CodeError Message
40170401Message Not Processed:Invalid Access token. Please provide valid access token.
40170402Message Not Processed:Missing Access token. Please provide valid access token.
40170405Message Not Processed: Accesstoken expired. Please try again with valid token.
40370403Message Not Processed:Not allowed to access requested resource. Please contact support for the access.
40470404Message Not Processed:Requested resource is not found.
42970429Message Not Processed: Allowed quota limit exceeded.
42970429Message Not Processed: Server is busy at the moment. Please try again later.
50370503Message Not Processed:One or more back-end is down. Please try again later.
50470504Message Not Processed:Back-end timed out. Please try again later.
50560014Message Not Processed. There is some technical error while processing request. Please report this to Support team.

Reviews