Skip to content

Emails

Your own mailboxes, hosting and sending limits.

Open Emails
Checked against the dashboard on November 19, 2026

Emails has fourteen public methods. They cover the reading side of the page: which mailboxes you have, the mail in them, its read and archived state, fetching new mail, and the AI's notes on a day and on a draft. Thirteen of them act for the account whose API key you use. The fourteenth, test_email, needs an admin key.

Sending a mail, adding a mailbox, choosing a plan, Email settings and forwarding addresses are done in the dashboard. They have no public method today.

Send a request to a method with your key:

curl -s https://xuda.ai/cpi/get_user_emails \
  -H 'content-type: application/json' \
  -d '{"api_key":"YOUR_API_KEY","uid":"YOUR_ACCOUNT_UID","mailbox_name":"inbox","read":false,"limit":25}'
const res = await fetch('https://xuda.ai/cpi/get_user_emails', {
  method: 'POST',
  headers: { 'content-type': 'application/json' },
  body: JSON.stringify({
    api_key: 'YOUR_API_KEY',
    uid: 'YOUR_ACCOUNT_UID',
    mailbox_name: 'inbox',
    read: false,
    limit: 25,
  }),
});
const { code, data } = await res.json();
import requests

res = requests.post(
    'https://xuda.ai/cpi/get_user_emails',
    json={
        'api_key': 'YOUR_API_KEY',
        'uid': 'YOUR_ACCOUNT_UID',
        'mailbox_name': 'inbox',
        'read': False,
        'limit': 25,
    },
)

A good answer has code 1. data holds docs, the mails; bookmark, to pass back for the next page; and total_emails.

Read the mail

  • get_user_mailboxes gives the mail counts of each mailbox.
  • get_user_emails lists mail. mailbox_name is inbox or sent, or any other folder path to match exactly. email_account_id limits it to one mailbox, search looks in the subject and the other party's name or address, read set to false gives only unread mail, and filter_type set to archived lists the archived mail that is otherwise left out. date_from and date_to (epoch milliseconds) bound the dates, contact_email gives the mail exchanged with one address, and email_id gives one message. Page with limit, skip and bookmark.
  • get_email_overview counts received mail per day, 14 days by default and up to 31, and the unread mail per mailbox. It is what draws the band's dots.
  • get_email_brief answers the one sentence the AI writes from the summaries of today's mail. It is kept for the day and written again only when today's mail changes. Pass locale and tz_offset to have it in the reader's language and day.

Tidy it

  • read_email and unread_email mark a mail, and its conversation item, read or unread by email_id. read_email leaves the mailbox's own seen flag and the mail's time alone.
  • archive_email archives a mail. unarchive_email puts an archived one back at the state it had.

Keep it current

  • refresh_mailboxes fetches new mail now, for every mailbox, or for one when you pass email_account_id. It is the same as the Refresh button.
  • pause_mailbox_import pauses a mailbox's import at once, as the import's Cancel does. Nothing more is read or filed for it until you continue syncing with refresh_mailboxes.
  • process_pending_email has the AI read one mail again. Pass reset_error to clear the error it stored first, as Try again does.

Ask for the AI's notes on a draft

get_email_read_along reads a draft beside the person writing it and writes nothing. It says what the mail being answered asks and whether the draft answers it, a file the draft mentions that is not attached, and a time it names that the calendar cannot make. Pass the draft as plain text in draft, the mail being answered in email_id, the names of attached files in attached, and tz_offset, time_zone and locale of the writer. It is what Read along uses.

Disconnect a mailbox

delete_email_account disconnects a mailbox by email_account_id. It is the same as Disconnect in the mailbox's window. The mailbox is marked deleted, and mail already brought in stays in the workspace.

A Xuda mailbox is deleted for good

Disconnecting a Xuda mailbox deletes it with all its mail on the mail server, and this cannot be undone. Disconnecting a Gmail or Outlook keeps the messages here and takes Xuda's access back. For an Outlook, Xuda deletes its own tokens; Xuda stays on the Microsoft account's list of apps until the person removes it there.

Methods

How is this guide?

Last updated on November 13, 2026