List email accounts for the current user
Returns active EmailAccount documents (across Gmail and Outlook), sorted newest-first. Admins see every mailbox in their organization. Everyone else, and an admin passing mine=true (the compose "From" picker), sees the mailboxes they may send from: connected by them, linked to them, linked to a group they belong to, or shared with them (their user, their department or one of their groups) through a send grant. Each entry carries via, saying how the caller reaches it, and verbs, the verbs it gives (["send"], or [] where via is null). The OAuth tokens subdocument is stripped from each entry.
Authorization
bearerAuth In: header
Query Parameters
true limits an admin to the mailboxes they may personally send from, as for a non-admin. Ignored for non-admins, who always get that set.
Value in
- "true"
- "false"
Response Body
application/json
application/json
curl -X GET "https://example.com/api/email/accounts"{ "accounts": [ { "_id": "665f1a0c0e0a4b001a2c9f50", "provider": "gmail", "emailAddress": "ops@acme.example", "isActive": true, "via": "grant", "verbs": [ "send" ] } ]}