Mail API reference

Mail API · Smtp-Config

post/v1/workspaces/{workspace_id}/smtp-config/verifyAuth

Test arbitrary SMTP creds without persisting

Path parameters

workspace_id*string · uuid

Id of the workspace.

Request body

host*string

SMTP server hostname.

Example: "smtp.sendgrid.net"

port*number

SMTP server port (commonly 587 for STARTTLS, 465 for implicit TLS).

Example: 587

secure*boolean

Whether to use implicit TLS (true → port 465 style). For STARTTLS on 587, set false.

Example: false

usernamestring

SMTP username. May be omitted alongside password for anonymous SMTP (e.g. postfix on a private network); otherwise both are required.

passwordstring

SMTP password. Stored encrypted at rest; never returned by GET endpoints.

from_name*string

Default From name on outbound messages.

Example: "Acme Notifications"

from_email*string · email

Default From email address. Must be authorized to send on the chosen domain.

Example: "noreply@acme.com"

Response · 200

ok*boolean

True when the server accepted the connection and login.

errorobject

The failure; absent when `ok` is true.

Example

Request

POST https://api.mail.productcraft.co/v1/workspaces/{workspace_id}/smtp-config/verify
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "host": "smtp.sendgrid.net",
  "port": 587,
  "secure": false,
  "username": "string",
  "password": "string",
  "from_name": "Acme Notifications",
  "from_email": "noreply@acme.com"
}

Response

{
  "ok": false,
  "error": {}
}