Skip to content

Email Accounts ​

Email accounts are the mailboxes your campaigns send from. Credentials (SMTP passwords, API keys, OAuth tokens) are never returned by the API.

Google and Microsoft accounts are connected through OAuth in the app (Settings → Email accounts). You can create SMTP and SendGrid accounts through the API.

The email account object ​

json
{
  "id": 2,
  "name": "Sales mailbox",
  "from_email": "sales@acme.com",
  "from_name": "Acme Sales",
  "type": "smtp",
  "is_default": true,
  "is_active": true,
  "daily_limit": 500,
  "sent_today": 132,
  "last_used_at": "...",
  "created_at": "...",
  "updated_at": "..."
}

type is one of smtp, sendgrid, google or microsoft.

Endpoints ​

MethodPathPermissionDescription
GET/email-accountsemail_accounts:readList accounts (paginated)
POST/email-accountsemail_accounts:writeCreate an SMTP or SendGrid account
GET/email-accounts/{id}email_accounts:readGet an account
PUT/email-accounts/{id}email_accounts:writeUpdate an account (partial)
DELETE/email-accounts/{id}email_accounts:writeDelete an account. Returns 204.
POST/email-accounts/{id}/testemail_accounts:writeTest the connection
POST/email-accounts/{id}/set-defaultemail_accounts:writeMake it the default account
GET/email-accounts/{id}/statsemail_accounts:readSending statistics
POST/email-accounts/{id}/reset-counteremail_accounts:writeReset sent_today to zero

List email accounts ​

GET /email-accounts returns only accounts in the authenticated token's workspace. Credentials are never included.

ParameterTypeDefaultDescription
pageinteger1Page number, starting at 1
per_pageinteger15Results per page, from 1 to 100
searchstringPartial name, sender email or sender name
typestringsmtp, sendgrid, google or microsoft
is_activebooleanFilter by active status
is_defaultbooleanFilter by default status
sortstringcreated_atname, from_email, type, is_default, is_active, daily_limit, sent_today, last_used_at, created_at or updated_at
directionstringdescasc or desc
http
GET /api/v1/email-accounts?search=sales&type=smtp&is_active=1&sort=name&direction=asc&per_page=30

The response follows the pagination contract. Equal sort values are ordered consistently by account ID.

Create an account ​

FieldRules
nameRequired. Max 255 characters
typeRequired. smtp or sendgrid
from_emailRequired. Email address
from_nameRequired. Max 255 characters
daily_limit1–10000, default 500
is_activeboolean, default true
smtp_host, smtp_port, smtp_username, smtp_passwordRequired when type=smtp. smtp_port must be one of 25, 465, 587, 993, 995 or 2525
smtp_encryptiontls (default) or ssl
sendgrid_api_keyRequired when type=sendgrid
json
{
  "name": "Sales mailbox",
  "type": "smtp",
  "from_email": "sales@acme.com",
  "from_name": "Acme Sales",
  "smtp_host": "smtp.acme.com",
  "smtp_port": 587,
  "smtp_username": "sales@acme.com",
  "smtp_password": "••••••••"
}

The first account you create in a workspace becomes the default.

201: { "data": EmailAccount }

Test the connection ​

POST /email-accounts/{id}/test
  • 200: { "data": { "success": true, "message": "SMTP connection successful" } }
  • 422: { "data": { "success": false, "message": "Connection failed. Please verify your credentials and try again." } }

Stats ​

json
{
  "data": {
    "sent_today": 132,
    "daily_limit": 500,
    "remaining_today": 368,
    "can_send_today": true,
    "total_sent": 18420,
    "sent_last_7_days": 2310,
    "sent_last_30_days": 9104,
    "last_used_at": "..."
  }
}

Delete ​

When you delete the default account, another account becomes the default. You can't delete your only account: that returns 403.

API v1.0