> ## Documentation Index
> Fetch the complete documentation index at: https://api.smartlead.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Email Account by Email Address

> Look up a single email account by its email address instead of paging through every account

<Note>
  Returns the same payload as [Get Email Account by ID](/api-reference/email-accounts/get-by-id). Use this when you know the address but not the account ID, so you don't have to page through [Get All Email Accounts](/api-reference/email-accounts/get-all) to find it.
</Note>

## Query Parameters

<ParamField query="api_key" type="string" required>
  Your SmartLead API key
</ParamField>

<ParamField query="email" type="string" required>
  The email address to look up, matched against the account's `from_email`. Case-insensitive for addresses stored in lowercase; otherwise pass the address exactly as it appears in `from_email`.
</ParamField>

<ParamField query="fetch_campaigns" type="boolean" default="false">
  If `true`, includes array of campaign IDs using this email account
</ParamField>

<ParamField query="fetch_tags" type="boolean" default="false">
  If `true`, includes the tags assigned to this email account
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://server.smartlead.ai/api/v1/email-accounts/fetch-email-account-details?api_key=YOUR_KEY&email=john@example.com"
  ```

  ```python Python theme={null}
  import requests

  API_KEY = "YOUR_API_KEY"

  response = requests.get(
      "https://server.smartlead.ai/api/v1/email-accounts/fetch-email-account-details",
      params={
          "api_key": API_KEY,
          "email": "john@example.com",
          "fetch_campaigns": True
      }
  )

  if response.status_code == 404:
      print("No email account with that address")
  else:
      account = response.json()
      print(f"Account ID: {account['id']}")
      print(f"SMTP Status: {'Connected' if account['is_smtp_success'] else 'Failed'}")
  ```

  ```javascript JavaScript theme={null}
  const API_KEY = 'YOUR_API_KEY';

  const params = new URLSearchParams({
    api_key: API_KEY,
    email: 'john@example.com',
    fetch_campaigns: true
  });

  const response = await fetch(
    `https://server.smartlead.ai/api/v1/email-accounts/fetch-email-account-details?${params}`
  );

  if (response.status === 404) {
    console.log('No email account with that address');
  } else {
    const account = await response.json();
    console.log(`Account ID: ${account.id}`);
  }
  ```
</RequestExample>

## Response Fields

<Info>
  Identical to [Get Email Account by ID](/api-reference/email-accounts/get-by-id), including `warmup_details` and the optional `campaign_ids` and `tags` arrays.
</Info>

## Response Codes

<ResponseField name="200" type="Success">
  Email account retrieved successfully
</ResponseField>

<ResponseField name="400" type="Bad Request">
  `email` is missing or not a valid email address
</ResponseField>

<ResponseField name="401" type="Unauthorized">
  Invalid or missing API key
</ResponseField>

<ResponseField name="404" type="Not Found">
  No email account with that address exists on your account
</ResponseField>

<ResponseField name="500" type="Internal Server Error">
  Server error occurred
</ResponseField>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "id": 123,
    "created_at": "2025-01-15T10:30:00.000Z",
    "updated_at": "2025-11-26T08:00:00.000Z",
    "user_id": 456,
    "from_name": "John Doe",
    "from_email": "john@example.com",
    "username": "john@example.com",
    "password": "decrypted_password",
    "smtp_host": "smtp.gmail.com",
    "smtp_port": 587,
    "smtp_port_type": "TLS",
    "message_per_day": 50,
    "is_smtp_success": true,
    "is_imap_success": true,
    "type": "GMAIL",
    "daily_sent_count": 25,
    "client_id": null,
    "warmup_details": {
      "id": 789,
      "status": "ACTIVE",
      "created_at": "2025-01-15T10:30:00.000Z",
      "reply_rate": 15,
      "warmup_key_id": 1001,
      "blocked_reason": null,
      "total_sent_count": 450,
      "total_spam_count": 2,
      "warmup_max_count": 30,
      "warmup_min_count": 10,
      "is_warmup_blocked": false,
      "max_email_per_day": 50,
      "warmup_reputation": 95
    },
    "campaign_ids": [101, 102, 103]
  }
  ```

  ```json 400 - Bad Request theme={null}
  {
    "statusCode": 400,
    "error": "Bad Request",
    "message": "\"email\" must be a valid email",
    "validation": {
      "source": "query",
      "keys": ["email"]
    }
  }
  ```

  ```json 404 - Not Found theme={null}
  {
    "error": "Email account not found"
  }
  ```
</ResponseExample>

## Usage Notes

<Warning>
  This endpoint returns decoded passwords in plain text. Use HTTPS and secure storage when handling this sensitive data.
</Warning>

<Tip>
  A 404 is the cheapest way to check whether an address is already connected, so you can use this endpoint to test for existence before calling [Add SMTP Account](/api-reference/email-accounts/add-smtp).
</Tip>

## Related Endpoints

* [Get Email Account by ID](/api-reference/email-accounts/get-by-id)
* [Get All Email Accounts](/api-reference/email-accounts/get-all)
* [Update Email Account](/api-reference/email-accounts/update)
