Adding an Email

Adding an Email

POST /emails

Description

Adds a new email account to the warmup pool. This endpoint requires the user to provide necessary details such as the email address and initial settings. On successful addition, the response includes the ID of the newly added email.

Request

const response = await fetch("https://partners.leadwarm.ai/api/v1/emails", {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        Authorization: `Bearer ${YOUR_API_KEY}`,
    },
    body: JSON.stringify({
        email: "example@gmail.com",
        pass: "xxxx",
        smtp_domain: "smtp.example.com",
        smtp_port: 587,
        smtp_tls: false,
        imap_domain: "imap.example.com",
        imap_port: 993,
        imap_tls: true,
    }),
});

Parameters

  • email (required): The email address to be added.
  • pass (required): The password or app password
  • smtp_domain (requried): The domain for the smtp server
  • smtp_port (required): The port of the smtp server
  • smtp_tls (required): Whether to use TLS encryption (needed for Port 465)
  • imap_domain (requried): The domain for the imap server
  • imap_port (required): The port of the imap server
  • imap_tls (required): Whether to use TLS encryption (needed for Port 993)

Response

{
    "id": "b9cf7c28-422b-43f6-b4d9-542080cb9103"
}
  • 200 OK: Successfully added the email.
  • 400 Bad Request: Required data is missing or data format is incorrect.
  • 401 Unauthorized: Authentication credentials are not provided or are invalid.