For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dashboard
User GuideDeveloper GuidesAPI Reference
User GuideDeveloper GuidesAPI Reference
    • Overview
  • Runtype API
      • POSTTrigger an immediate IMAP poll
      • POSTStart IMAP polling
      • GETGet IMAP polling status
      • POSTStop IMAP polling
      • POSTSend a test email via SMTP
      • POSTVerify IMAP + SMTP connection
Dashboard
LogoLogo
Runtype APIEmail IMAP

Start IMAP polling

POST
/v1/messaging/imap/:surfaceId/start
POST
/v1/messaging/imap/:surfaceId/start
$curl -X POST https://api.runtype.com/v1/messaging/imap/surfaceId/start \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "fromAddress": "notifications@example.com",
> "imapHost": "imap.example.com",
> "imapPassword": "SecureP@ssw0rd!",
> "imapPort": 993,
> "imapUsername": "user@example.com",
> "smtpHost": "smtp.example.com",
> "smtpPassword": "AnotherS3cureP@ss",
> "smtpPort": 587,
> "smtpUsername": "user@example.com"
>}'
1{
2 "success": true
3}

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

Was this page helpful?
Previous

Get IMAP polling status

Next
Built with

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