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

Get IMAP polling status

GET
/v1/messaging/imap/:surfaceId/status
GET
/v1/messaging/imap/:surfaceId/status
$curl https://api.runtype.com/v1/messaging/imap/surfaceId/status \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json"
1{
2 "active": true,
3 "config": {
4 "host": "imap.mailprovider.com",
5 "mailbox": "INBOX",
6 "pollIntervalMinutes": 5,
7 "pollingEnabled": true,
8 "port": 993,
9 "provider": "Gmail",
10 "secure": true,
11 "username": "user@example.com"
12 },
13 "consecutiveErrors": 0,
14 "lastError": null,
15 "lastPollAt": "2024-06-15T10:45:00Z",
16 "lastUid": 4523,
17 "mailbox": "INBOX",
18 "messagesProcessed": 120,
19 "nextPollAt": "2024-06-15T10:50:00Z",
20 "pollIntervalMinutes": 5,
21 "pollStatus": "idle"
22}
Returns the current polling status and masked inbound configuration for an email surface.
Was this page helpful?
Previous

Stop IMAP polling

Next
Built with

Authentication

AuthorizationBearer
API key or Clerk session token

Path parameters

surfaceIdstringRequired

Response

Polling status
activeboolean
configobject
consecutiveErrorsinteger
lastErrorstring or null
lastPollAtstring or null
lastUidinteger
mailboxstring
messagesProcessedinteger
nextPollAtstring or null
pollIntervalMinutesinteger
pollStatusenum
Allowed values:

Errors

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