Policies & help › Developers

API Documentation

Effective 8 October 2026 · Version 1.0

Reference for the live Indo Mail HTTP API at https://indoemail.in: sign-in including the 2-step flow, conventions, routes by area, curl examples, and the planned versioned API and API keys.

1. Status and scope

The Indo Mail web and Android apps are built on a JSON API served from https://indoemail.in. You can call the same API from your own scripts to work with your own account. This is a first-party API. It is live, but it is not yet a public developer product: there is no developer portal, no API keys, no OAuth for third-party apps, no webhooks and no official SDK yet. Those are described as Planned at the end of this page.

Because the API is shared with our own apps, routes can change as the apps change. We will tell developers who have early access (see the Developer Portal document) before breaking changes. Use the API only for your own account, or for accounts whose owners have asked you to.

2. Conventions

3. Authentication

Sign in with your address (or username) and password. The reply contains a bearer token that lasts 7 days. Store it like a password.

If you have turned on 2-Step Verification, the first call does not return a token. It returns {"twoFactor":true,"ticket":"..."}. The ticket is valid for 5 minutes. Send it to the second step with the six-digit code from your authenticator app, and you receive the token and your user record.

RouteBodyReply
POST /api/auth/loginlogin, passwordtoken and user, or twoFactor and ticket
POST /api/auth/login/2faticket, codetoken and user
POST /api/auth/2fa/setupnone (signed in)secret and otpauthUrl for the authenticator app
POST /api/auth/2fa/enablecodeok and the updated user
POST /api/auth/2fa/disablepasswordok and the updated user
GET /api/auth/activitynoneyour last 50 sign-in events: event, ip, device, at
GET /api/auth/menoneyour user record
PATCH /api/auth/medisplayName, signature, recoveryEmail, phoneupdated user
POST /api/auth/change-passwordcurrentPassword, newPasswordok
POST /api/auth/registerusername, password, displayName, phone, recoveryEmail (optional)token and user (201)
POST /api/auth/register-businessorgName, domain, username, password, displayName, phone, recoveryEmail (optional)token and user for the first administrator (201)

Public helpers: GET /api/auth/config, GET /api/auth/check-username?u=&domain= and GET /api/auth/check-domain?d=. A mobile number is required at sign-up. A token stops working when the account is disabled or its business domain is suspended.

4. Mail

All routes are under /api/mail and need a token.

RoutePurpose
GET /messagesList conversations. Query: folder (inbox, starred, sent, drafts, archive, all, spam, trash, or label:ID), q (search with operators such as from:, has:attachment, is:unread), limit (up to 100), page.
GET /threads/:threadIdOpen a conversation and mark it read.
GET /messages/:idRead one message.
PATCH /messages/:idChange one message: isRead, isStarred, or an action (with labelId for labels).
POST /threads/actionAct on conversations: threadIds, action (read, unread, star, unstar, archive, inbox, spam, notspam, trash, restore, delete, label, unlabel) and folder.
POST /folders/:folder/emptyEmpty Trash or Spam.
GET /countsUnread and total counts for the folder list.
POST /draftsCreate or update a draft: to, cc, bcc, subject, html, draftId, inReplyToId.
POST /sendSend a message (multipart). See section 8.
GET /labels, POST /labels, PATCH /labels/:id, DELETE /labels/:idManage coloured labels: name and a colour such as #0061FD.
GET /contacts?q=Suggest addresses while composing.
GET /attachments/:idDownload an attachment with your token.
GET /attachments/:id/linkGet a signed, short-lived download link.
GET /download/:id?dl=Download with a signed link. No token needed while the link is valid.
POST /events-ticket and GET /eventsGet a 60-second ticket and open the live stream of new-mail events.

5. Drive, Photos and Cloud

Routes are under /api/drive. Folders and files belong to a space (drive, photos or vault), and the space field chooses it for top-level items.

RoutePurpose
GET /usageStorage used and your allowance.
GET /itemsList items in a folder or space.
POST /foldersCreate a folder: name, parentId, space.
POST /uploadUpload up to 20 files (multipart field files) with optional parentId and space.
GET /configWhether large uploads are available.
POST /uploads, POST /uploads/:id/parts, POST /uploads/:id/complete, DELETE /uploads/:idLarge file upload in parts directly to Amazon S3, up to 5 GB. Parts are 64 MB.
POST /from-attachment/:attIdSave a mail attachment into Drive.
GET /items/:id/content, GET /items/:id/linkDownload a file, or get a signed link.
PATCH /items/:id, DELETE /items/:id, POST /trash/emptyRename, move, delete and empty trash.
GET /albums, POST /albums, GET /albums/:id, POST /albums/:id/items, DELETE /albums/:idPhoto albums.
GET /attachmentsFiles that arrived as mail attachments.

6. Other apps

Under /api/apps: contacts (GET, POST, PUT /contacts/:id, DELETE, GET /contacts.vcf, POST /contacts/import); Maps (GET /maps/config, /maps/search, /maps/places, POST and DELETE saved places); Translate (GET /translate/languages, POST /translate, GET and DELETE /translate/history; 34 languages); Wallet (GET /wallet, PUT /wallet/settings, POST /wallet/requests, PATCH /wallet/requests/:id); Travel (trips and items, GET /travel/detected); Business Profile (GET and PUT /profile).

7. Business, admin, advertising and push

These areas need the right role.

AreaRoutesWho can call
Company admin (/api/business)GET and PATCH /domain, POST /domain/verify (live DNS check), GET and POST /users, PATCH /users/:idAdministrators of a company domain
Indo Mail admin (/api/admin)GET /stats, GET and POST /users, PATCH /users/:id, GET /domains, PATCH /domains/:id, GET /queue, GET /customers, GET /customers.csv, GET /customers/:id/activity, POST /reports/monthlyIndo Mail administrators only
Ads (/api/ads)GET and PUT /advertiser; campaigns (GET, POST, PATCH, DELETE) and POST /campaigns/:id/creatives; GET /leads; GET /reports?days=; merchant and manufacturer products; tag containers and tags; GET /eligibleSigned-in advertisers
Ad review (/api/ads/review)GET /review, POST /review/:idIndo Mail administrators
Push (/api/push)GET /key, POST /subscribe, POST /unsubscribe, GET /devices, POST /test, device routes for the Android appSigned-in users; GET /key is public

Public routes that need no token: GET /api/ads/serve, GET /api/network/ads, GET /a/:id, POST /api/ads/leads/:creativeId, GET /t/:pid.js, POST /t/:pid/collect, GET /healthz, GET /api/ops/status.

8. Examples

Replace the address and password with your own. The examples use jq to read the token.

9. Good practice

10. Planned: versioned API and API keys

Planned, not live. We intend to publish a stable, versioned API under /api/v2 for third-party developers, with a deprecation notice of at least 12 months for breaking changes. We also plan API keys with fixed scopes that can be created and revoked in Settings, so that scripts do not have to use your password. These will sit beside the planned OAuth 2.0 sign-in (see the OAuth Authentication document) and webhooks. Dates are not fixed. Routes described above under /api will keep working until /api/v2 is released and for the notice period after that.

11. Contact

Developer questions and early access: contact@indoemail.in with the subject "Developer access". Security issues in the API: security@indoemail.in.

INDO CHATS PRIVATE LIMITED, 168, GT Rd, near Aloka Cinema, Shibpur, Howrah, West Bengal 711102, India.