> ## 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 ID

> Retrieve complete configuration, credentials, and warmup details for a specific email account

<Note>
  Returns detailed email account information including SMTP/IMAP credentials (with decoded passwords), warmup statistics, and optionally the list of campaigns using this account.
</Note>

## Path Parameters

<ParamField path="email_account_id" type="number" required>
  The email account ID to retrieve
</ParamField>

## Query Parameters

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

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

<RequestExample>
  ```bash cURL theme={null}
  curl "https://server.smartlead.ai/api/v1/email-accounts/123/?api_key=YOUR_KEY&fetch_campaigns=true"
  ```

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

  API_KEY = "YOUR_API_KEY"
  account_id = 123

  response = requests.get(
      f"https://server.smartlead.ai/api/v1/email-accounts/{account_id}/",
      params={
          "api_key": API_KEY,
          "fetch_campaigns": True
      }
  )

  account = response.json()
  print(f"Account: {account['from_email']}")
  print(f"SMTP Status: {'Connected' if account['is_smtp_success'] else 'Failed'}")
  print(f"Warmup Status: {account['warmup_details']['status']}")
  if 'campaign_ids' in account:
      print(f"Used in {len(account['campaign_ids'])} campaigns")
  ```

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

  const params = new URLSearchParams({
    api_key: API_KEY,
    fetch_campaigns: true
  });

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

  const account = await response.json();
  console.log(`Account: ${account.from_email}`);
  console.log(`SMTP Status: ${account.is_smtp_success ? 'Connected' : 'Failed'}`);
  console.log(`Warmup Status: ${account.warmup_details.status}`);
  if (account.campaign_ids) {
    console.log(`Used in ${account.campaign_ids.length} campaigns`);
  }
  ```
</RequestExample>

## Response Fields

<Info>
  Response includes the same fields as Get All Email Accounts, plus detailed warmup configuration and optionally campaign IDs.
</Info>

<ResponseField name="warmup_details" type="object">
  Comprehensive warmup details with additional fields

  <Expandable title="Extended warmup properties">
    <ResponseField name="id" type="number">
      Warmup detail record ID
    </ResponseField>

    <ResponseField name="status" type="string">
      Warmup status: `ACTIVE`, `INACTIVE`, `PAUSED`
    </ResponseField>

    <ResponseField name="created_at" type="timestamp">
      When warmup was initiated
    </ResponseField>

    <ResponseField name="reply_rate" type="number">
      Reply rate percentage for warmup emails
    </ResponseField>

    <ResponseField name="warmup_key_id" type="number">
      Warmup service key identifier
    </ResponseField>

    <ResponseField name="blocked_reason" type="string | null">
      Reason if warmup is blocked
    </ResponseField>

    <ResponseField name="total_sent_count" type="number">
      Total warmup emails sent
    </ResponseField>

    <ResponseField name="total_spam_count" type="number">
      Total warmup emails marked as spam
    </ResponseField>

    <ResponseField name="warmup_max_count" type="number">
      Maximum warmup emails per day
    </ResponseField>

    <ResponseField name="warmup_min_count" type="number">
      Minimum warmup emails per day
    </ResponseField>

    <ResponseField name="is_warmup_blocked" type="boolean">
      Whether warmup is blocked
    </ResponseField>

    <ResponseField name="max_email_per_day" type="number">
      Maximum emails allowed per day (warmup + campaign)
    </ResponseField>

    <ResponseField name="warmup_reputation" type="number">
      Warmup reputation score (0-100)
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="campaign_ids" type="array">
  Array of campaign IDs using this email account (only if `fetch_campaigns=true`)
</ResponseField>

## Response Codes

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

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

<ResponseField name="404" type="Not Found">
  Email account not found or you don't have access to it
</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 401 - Unauthorized theme={null}
  {
    "message": "Invalid API Key"
  }
  ```

  ```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>
  Use `fetch_campaigns=true` to see which campaigns are using this email account before making changes or deletions.
</Tip>

## Related Endpoints

* [Get All Email Accounts](/api-reference/email-accounts/get-all)
* [Update Email Account](/api-reference/email-accounts/update)
* [Update Warmup Settings](/api-reference/email-accounts/warmup-settings)
