Zum Inhalt springen
Leadtime
Deutsch
Esc
↑↓navigieren↵öffnen⌘Jvorschau

Get email account details

Retrieves detailed information about a specific email account by ID.

Response Includes:

  • Account identification (ID, email, display name)
  • Account type (IMAP, Google, Office365)
  • Current status and last error message (if any)
  • Timestamps (created, last updated)
  • Capabilities indicating what operations are allowed via API

Security:

  • Sensitive fields (passwords, OAuth tokens) are excluded from responses
  • For IMAP accounts, configuration details are visible but passwords are masked
  • For OAuth accounts, only basic information is returned
GET/administration/email-accounts/{id}
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:read
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
idstringrequired
Responses
200

Email account retrieved successfully

capabilitiesobjectrequired

Account capabilities indicating what operations can be performed via API. Includes restrictions for OAuth accounts.

Show properties
canDeletebooleanrequired

Whether the account can be deleted via API. This is true for all account types, including OAuth accounts.

canEditbooleanrequired

Whether the account can be edited via API. This is true for IMAP accounts and false for OAuth accounts (Google, Office365) which must be managed through the web application for security reasons.

reasonstring

Optional reason explaining why certain operations are restricted. This field is only present for OAuth accounts to explain why they cannot be created or updated via API.

createdAtstring<date-time>required

ISO 8601 timestamp indicating when the account was created

displayNameobject

Optional display name for the email account. This name will be shown in the email account list and may be used as the sender name when sending emails.

editedAtstring<date-time>required

ISO 8601 timestamp indicating when the account was last modified

emailstringrequired

Email address associated with this account. Used for sending and receiving emails.

idstring<uuid>required

Unique identifier (UUID) of the email account

lastErrorobject

Most recent error message, if the account has encountered any issues. This helps diagnose connection or authentication problems.

statusobjectrequired

Current operational status of the account. Indicates whether the account is working correctly or has encountered issues.

Show properties
object
typestringrequired

Type of email account. Determines how the account is authenticated and what operations are available via API.

Allowed:imapgoogleoffice365
401

Unauthorized - Invalid or missing authentication token

403

Forbidden - Insufficient API scopes or permissions

404

Email account not found

Try it
Server
Authorization
Parameters
Request
curl -X GET "https://leadtime.app/api/public/administration/email-accounts/string" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
{
  "capabilities": {
    "canDelete": true,
    "canEdit": true,
    "reason": "OAuth accounts can only be managed through the web application"
  },
  "createdAt": "2024-01-15T10:30:00Z",
  "displayName": "Support Team",
  "editedAt": "2024-01-20T14:45:00Z",
  "email": "support@example.com",
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "lastError": "Failed to connect to SMTP server",
  "status": "active",
  "type": "imap"
}