All entries required authentication unless specified.
POST
{
"username": username,
"password": password
}
returns
{"id_token": jwt_token}
no_auth
GET
returns
{"timezone": timezone,
"api_version": version}
GET
returns
{"thread_count": count,
"message_count": count}
GET
returns
{"count": number of tags,
"tags": list of tags}
GET
returns
{"download_token": jwt download token}
GET
returns
attachment data or 410/404/401
GET
returns
{"headers": message headers,
"body": recusrive message body content,
"id": message id,
"tags": message tags list}
or 404
GET
returns
{"id": thread id,
"count": number of messages,
"authors": authors list,
"oldest_date": unix timestamp,
"newest_date": unix timestamp,
"subject": thread subject,
"messages": message summary hierarchy
}
or 404
GET
parameters
limit: maximum number of results to return
offset: start index of first result returned
returns
{"threads": [{"id": thread id,
"count": number of messages,
"authors": authors list,
"oldest_date": unix timestamp,
"newest_date": unix timestamp,
"subject": thread subject
}, ...]
"total": total number of search results,
"count": returned results,
"limit": maximum number of results returned,
"offset": start index of first result returned}
GET
parameters
limit: maximum number of results to return
offset: start index of first result returned
returns
{"messages": [{"id": thread id,
"date": unix timestamp,
"thread": thread id,
"from": sender,
"to": recipients,
"subject": message subject
}, ...]
"total": total number of search results,
"count": returned results,
"limit": maximum number of results returned,
"offset": start index of first result returned}
GET
returns
{"thread_count": query thread count,
"message_count": query message count}
POST
{"add_tags": list of tags to add,
"remove_tags": list of tags to remove (true to remove all),
"search": search query to retag,
"sync_maildir": synchronize maildir flags on retag (true/false)}
returns
{"status": "ok"} or 500
GET
returns
{"accounts": list of user accounts as in sleepy.cfg}
GET
returns
{"contacts": list of contacts using configured contact_query}
each contact is as follow:
{display name: list of addresses}
POST
{"account": sender account index,
"message": {"subject": message subject,
"sender": message sender,
"body": plain text content,
"charset": content charset,
"html": html content,
"cc": list of recipients,
"recipients": list of recipients,
"references": message references,
"reply_to": parent id,
"bcc": list of recipients
}
}
returns
{"status": "ok"} or 500