Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Overview
- The Email Sender API from LetsExtract allows you to send emails programmatically. With this API, you can send personalized emails, manage email templates, and track email statuses with ease. It is designed for developers looking to integrate email capabilities into their applications efficiently.
- Endpoint
- The base URL for the Email Sender API is as follows:
- https://api.letsextract.com/v1/send-email
- Request Method
- This API uses the POST method to submit email sending requests.
- Request Body
- The request body should be in JSON format and include the following fields:
- to: (string) The recipient's email address. (Required)
- subject: (string) The subject of the email. (Required)
- body: (string) The content of the email. (Required)
- from: (string) The sender's email address. (Optional)
- attachments: (array) A list of file URLs to include as attachments. (Optional)
- Example Request
- Here’s an example JSON request to send an email using the Email Sender API:
- {
- "subject": "Welcome to LetsExtract!",
- "body": "Hello, \n\nThank you for signing up for LetsExtract. We are excited to have you on board! \n\nBest regards, \nThe LetsExtract Team",
- "attachments": ["https://example.com/file1.pdf", "https://example.com/file2.jpg"]
- }
- cURL Example
- You can use the following cURL command to send an email using the API:
- curl -X POST https://api.letsextract.com/v1/send-email \
- -H "Content-Type: application/json" \
- -H "Authorization: Bearer YOUR_API_KEY" \
- -d '{
- "to": "[email protected]",
- "subject": "Welcome to LetsExtract!",
- "body": "Hello, \n\nThank you for signing up for LetsExtract. We are excited to have you on board! \n\nBest regards, \nThe LetsExtract Team",
- "from": "[email protected]",
- "attachments": ["https://example.com/file1.pdf", "https://example.com/file2.jpg"]
- }'
- Response
- A successful response will look like this:
- {
- "status": "success",
- "data": {
- "email_id": "123456",
- "message": "Email sent successfully."
- }
- }
- If there is an error, the response will be:
- {
- "status": "error",
- "message": "Failed to send email. Invalid recipient address."
- }
- Documentation
- For further details and use cases, you can visit the official documentation of the Email Sender API at: https://letsextract.com/email-sender/
Advertisement
Add Comment
Please, Sign In to add comment