Start IMAP polling

Persists IMAP/SMTP configuration on the surface and starts the polling Durable Object.

Authentication

AuthorizationBearer
API key or Clerk session token

Path parameters

surfaceIdstringRequired

Request

This endpoint expects an object.
fromAddressstringRequiredformat: "email"
imapHoststringRequired>=1 character
imapPasswordstringRequired>=1 character
imapPortintegerRequired1-65535
imapUsernamestringRequired>=1 character
smtpHoststringRequired>=1 character
smtpPasswordstringRequired>=1 character
smtpPortintegerRequired1-65535
smtpUsernamestringRequired>=1 character
fromNamestringOptional
imapSecurebooleanOptional
mailboxstringOptional
pollIntervalMinutesintegerOptional1-60
smtpSecurebooleanOptional

Response

Polling started
successboolean

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error