Email API
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 Method | REST Endpoint | Description | Consumers | |
---|---|---|---|---|
1. | POST | /v1/smtp/email | This 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/email | This 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/attachments | This V2 version endpoint uses Mimecast server by taking 'attachments' like pdf,excel,csv,docx,txt,jpeg | Desktop / Web User |
Flow Diagram and Description: V1 version
- The V1 version communicates with SMTP server through ca-utility-sapi API and send emails.
- This API sends an email by taking fromEmail, toEmail, subject and name as input query parameters.
Flow Diagram and Description: V2 version
- The V2 version communicates with Mimecast server through ca-utility-sapi API end points and send emails.
- It sends an email by, taking bcc and attachments in input post request.
- The attachments end point will take attachments for following extensions pdf, excel, csv, docx, txt, jpeg and send an email
Sequence Diagram: V1 version
Sequence Diagram: V2 version
Steps In Sequence Diagram
for /v1/smtp/email
No | Steps | Description |
---|---|---|
1. | Input Request Message | Script Validation get service invokes the mule services along with credentials via Mule Soft Secure API layer. |
2. | Validate the Bearer token credentials | If the token is authorized the request is sent to the endpoint. |
3. | If validation fails, service returns specific fault response | If validation fails, service returns specific fault response to the caller. |
4. | If the request succeeds after calling SMTP server Endpoint | A success response is sent to the Xapi which sends the success response to the caller. |
5. | If the request fails after calling the System layer | A failed response or a message is sent to Xapi which send the messages to the caller. |
for /v2/smtp/email
No | Steps | Description |
---|---|---|
1. | Input Request Message | Script Validation get service invokes the mule services along with credentials via Mule Soft Secure API layer. |
2. | Validate the Bearer token credentials | If client_id and client_secret are validated by identity application. |
3. | If validation fails, service returns specific fault response | If validation fails, service returns specific fault response to the caller. |
4. | If the request succeeds after calling Mimecast server Endpoint | A success response is sent to the Xapi which sends the success response to the caller. |
5. | If the request fails after calling the System layer | A 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
Topic | Details | |
---|---|---|
1. | Operation Description | • Send Email to specified email address |
2. | URI | /v1/smtp/email |
3. | Interface Source | Desktop / Web User |
4. | Interface Target | CA-UTILITY-SAPI send email to email address in request |
5. | Synchronous/Asynchronous | Synchronous |
6. | Protocol | HTTPs |
7. | URL | https://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 server | SMTP Email server |
Email Experience API : /v2/smtp/email
Topic | Details | |
---|---|---|
1. | Operation Description | • Send Email to specified email address with attachments |
2. | URI | /v2/smtp/email |
3. | Interface Source | Desktop / Web User |
4. | Interface Target | CA-UTILITY-SAPI send email to email address in request |
5. | Synchronous/Asynchronous | Synchronous |
6. | Protocol | HTTPs |
7. | URL | https://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 server | Mimecast server |
Email Experience API : /v2/smtp/email/attachments
Topic | Details | |
---|---|---|
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 Source | Desktop / Web User |
4. | Interface Target | CA-UTILITY-SAPI send email to email address in request |
5. | Synchronous/Asynchronous | Synchronous |
6. | Protocol | HTTPs |
7. | URL | https://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 server | Mimecast server |
Error Codes
HTTP Code | Error Code | Error Message |
---|---|---|
401 | 70401 | Message Not Processed:Invalid Access token. Please provide valid access token. |
401 | 70402 | Message Not Processed:Missing Access token. Please provide valid access token. |
401 | 70405 | Message Not Processed: Accesstoken expired. Please try again with valid token. |
403 | 70403 | Message Not Processed:Not allowed to access requested resource. Please contact support for the access. |
404 | 70404 | Message Not Processed:Requested resource is not found. |
429 | 70429 | Message Not Processed: Allowed quota limit exceeded. |
429 | 70429 | Message Not Processed: Server is busy at the moment. Please try again later. |
503 | 70503 | Message Not Processed:One or more back-end is down. Please try again later. |
504 | 70504 | Message Not Processed:Back-end timed out. Please try again later. |
505 | 60014 | Message Not Processed. There is some technical error while processing request. Please report this to Support team. |