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

# List Email Servers

> Returns all email servers configured for the authenticated account

## Overview

Use this endpoint to retrieve the `id` values needed for the `emailServerId` field when creating or updating agents.

Sensitive fields (SMTP passwords, SendGrid API keys) are never returned.

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET https://api.telzino.com/v1/email-servers \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.telzino.com/v1/email-servers', {
    headers: {
      'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
    }
  });

  const { data } = await response.json();
  // data[0].id  ← use this as emailServerId when creating/updating an agent
  ```

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

  response = requests.get(
      'https://api.telzino.com/v1/email-servers',
      headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'}
  )

  email_servers = response.json()['data']
  # email_servers[0]['id']  ← use this as emailServerId
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": [
      {
        "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "name": "Test",
        "type": "smtp",
        "is_default": true,
        "smtp_host": "smtp.gmail.com",
        "smtp_port": 587,
        "smtp_from_email": "agent@yourcompany.com",
        "smtp_from_name": "AI Agent",
        "sendgrid_from_email": null,
        "sendgrid_from_name": null,
        "created_at": "2026-01-10T09:00:00Z",
        "updated_at": "2026-01-10T09:00:00Z"
      }
    ]
  }
  ```

  ```json 401 theme={null}
  {
    "error": "unauthorized",
    "error_description": "User payload not found"
  }
  ```
</ResponseExample>

## Response Fields

| Field                 | Type           | Description                                                                                   |
| --------------------- | -------------- | --------------------------------------------------------------------------------------------- |
| `id`                  | string (UUID)  | Use this as `emailServerId` when creating or updating an agent                                |
| `name`                | string         | Display name of the email server                                                              |
| `type`                | string         | `smtp` or `sendgrid`                                                                          |
| `is_default`          | boolean        | Whether this is the account's default server (used when `emailServerId` is omitted or `null`) |
| `smtp_host`           | string \| null | SMTP hostname (SMTP servers only)                                                             |
| `smtp_port`           | number \| null | SMTP port (SMTP servers only)                                                                 |
| `smtp_from_email`     | string \| null | From email address (SMTP servers only)                                                        |
| `smtp_from_name`      | string \| null | From name (SMTP servers only)                                                                 |
| `sendgrid_from_email` | string \| null | From email address (SendGrid servers only)                                                    |
| `sendgrid_from_name`  | string \| null | From name (SendGrid servers only)                                                             |
