The counts on the mail tabs
GET
/api/v1/mail/badges
const url = 'https://deck.example.com/api/v1/mail/badges';const options = {method: 'GET', headers: {cookie: 'qd_auth=<qd_auth>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://deck.example.com/api/v1/mail/badges \ --cookie qd_auth=<qd_auth>Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The counts on the Inbox page’s tabs.
Media typeapplication/json
The counts on the Inbox page’s tabs.
object
drafts
required
How many drafts there are now.
integer format: uint32
inbox
required
Emails waiting for the person’s approval: the distinct threads across the open cards.
integer format: uint32
sent
required
Sent messages new since the person last opened the Sent tab.
integer format: uint32
Example generated
{ "drafts": 1, "inbox": 1, "sent": 1}default
Section titled “default”An error, with its message.
Media typeapplication/json
Every error the REST API returns, with an HTTP status.
object
error
required
string
Example generated
{ "error": "example"}